cohenjo / pg_idx_advisor

A PostgreSQL extension to analyze queries and give indexing advice.
50 stars 8 forks source link

Compilation fails with newer version of PGSQL #6

Open Skylion007 opened 7 years ago

Skylion007 commented 7 years ago

I am having a bit of trouble getting the extension to compile with PostGresSQL 9.6.1.

I get the following errors: In file included from src/utils.c:20: src/utils.h:27:34: error: catalog/pg_collation.h: No such file or directory src/utils.h:48:25: error: utils/bytea.h: No such file or directory src/utils.h:57:28: error: utils/spccache.h: No such file or directory

I am little unsure about how to proceed with compilation. Any help would be appreciated.

System is CentOS6. GCC 4.4.7

Skylion007 commented 7 years ago

K found the real issue. One make was using the wrong version of PGSQL. However, there is an API change that did break the extension rd_am needs to be updated rd_amroutine. I am not sure exactly which version number broke it, but I will be glad to submit a pull request to fix it soon, look version 9.6 is what broke it.

cohenjo commented 7 years ago

Hi, glad you found the compilation error (sorry I didn't have time to look at this yet...) the access methods were revamped in 9.6 to allow for costume Ams - makes sense that it broke things... let me know if you find it... (or if you need/want help with it...) I did this mostly to learn how PG works internally with indexing - might be a bug or 2 lurking in the dark here...

kind regards,