Open ArturFormella opened 7 years ago
Hi, pg10 made lots of changes to the AM system. This project was mostly for learning purposes so I didn't follow the latest version.
I'll have a look if it's not too hard to update...
Note Diablo have a similar project they started recently - I think they are maintaining it actively.
Regards, Jony
Similar Issue was encountered with 9.6 version.
src/idx_adviser.c: In function ‘get_relation_info_callback’: src/idx_adviser.c:872:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘void (*)()’ [-Wformat=] elog( DEBUG4 ,"IND ADV: amcostestimate=%d",info->amcostestimate); ^ src/idx_adviser.c:876:24: warning: assignment makes pointer from integer without a cast [enabled by default] info->amcostestimate=(RegProcedure)1268; //btcostestimate ^ src/idx_adviser.c:880:10: error: ‘BTREE_AM_OID’ undeclared (first use in this function) case BTREE_AM_OID: ^ src/idx_adviser.c:880:10: note: each undeclared identifier is reported only once for each function it appears in src/idx_adviser.c:881:26: warning: assignment makes pointer from integer without a cast [enabled by default] info->amcostestimate=(RegProcedure)1268; //btcostestimate ^ src/idx_adviser.c:883:10: error: ‘GIN_AM_OID’ undeclared (first use in this function) case GIN_AM_OID: ^ src/idx_adviser.c:884:26: warning: assignment makes pointer from integer without a cast [enabled by default] info->amcostestimate=(RegProcedure)772; //gistcostestimate ^ src/idx_adviser.c:888:10: error: ‘GIST_AM_OID’ undeclared (first use in this function) case GIST_AM_OID: ^ src/idx_adviser.c:889:26: warning: assignment makes pointer from integer without a cast [enabled by default] info->amcostestimate=(RegProcedure)772; //gistcostestimate ^ src/idx_adviser.c:892:10: error: ‘BRIN_AM_OID’ undeclared (first use in this function) case BRIN_AM_OID: ^ src/idx_adviser.c:893:26: warning: assignment makes pointer from integer without a cast [enabled by default] info->amcostestimate=(RegProcedure)3800; //brincostestimate ^ src/idx_adviser.c:901:39: error: ‘struct RelationData’ has no member named ‘rd_am’ info->amcanorderbyop = indexRelation->rd_am->amcanorderbyop; ^ src/idx_adviser.c:902:38: error: ‘struct RelationData’ has no member named ‘rd_am’ info->amoptionalkey = indexRelation->rd_am->amoptionalkey; ^ src/idx_adviser.c:903:38: error: ‘struct RelationData’ has no member named ‘rd_am’ info->amsearcharray = indexRelation->rd_am->amsearcharray; ^ src/idx_adviser.c:904:38: error: ‘struct RelationData’ has no member named ‘rd_am’ info->amsearchnulls = indexRelation->rd_am->amsearchnulls;
BINDIR = /usr/pgsql-9.6/bin DOCDIR = /usr/pgsql-9.6/share/doc HTMLDIR = /usr/pgsql-9.6/share/doc INCLUDEDIR = /usr/pgsql-9.6/include PKGINCLUDEDIR = /usr/pgsql-9.6/include INCLUDEDIR-SERVER = /usr/pgsql-9.6/include/server LIBDIR = /usr/pgsql-9.6/lib PKGLIBDIR = /usr/pgsql-9.6/lib LOCALEDIR = /usr/pgsql-9.6/share/locale MANDIR = /usr/pgsql-9.6/share/man SHAREDIR = /usr/pgsql-9.6/share SYSCONFDIR = /usr/pgsql-9.6/etc PGXS = /usr/pgsql-9.6/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--prefix=/usr/pgsql-9.6' '--with-openssl' '--with-libxml' '--without-readline' CC = gcc CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/usr/include/libxml2 CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 CFLAGS_SL = -fPIC LDFLAGS = -L../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-9.6/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxml2 -lssl -lcrypto -lz -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.6.5
I'm also getting similar errors in PostgreSQL 10. Sounds like this extension was not make for this version. I googled "Note Diablo" but didn't see anything. Does anyone happen to know where this extension exists?
Hi, Yes, unfortunately I didn’t get to work much with Postgres lately so I didn’t have time to add all the new stuff they added for later versions.
There are a couple of nice extensions that help getting to know what PG is doing. If specifically you need hypothetical indexes have a look at: https://github.com/HypoPG/hypopg/
Have a look at PoWA - https://github.com/powa-team/powa It builds on top of many of the well used pg stats extensions: pg_stat_statements pg_qualstats pg_stat_kcache pg_wait_sampling pg_track_settings
I think this should point you to a good start :) Have a nice day
Hello! I get the following error when trying to build with PostgreSQL 10
My pg_config
Thanks in advance!