Skip to content

PostgreSQL 14 support #47

@devrimgunduz

Description

@devrimgunduz

Hi,

pg_squeeze 1.3.1 fails to compile against v14. v14 entered beta, and we started packaging stuff. Can you please take a look?

Thanks!

/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I. -I./ -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o pgstatapprox.bc pgstatapprox.c
concurrent.c: In function 'apply_concurrent_changes':
concurrent.c:301:57: warning: passing argument 1 of 'ExecInsertIndexTuples' from incompatible pointer type [-Wincompatible-pointer-types]
301 | recheck = ExecInsertIndexTuples(slot,
| ^~~~
| |
| TupleTableSlot *
In file included from concurrent.c:17:
/usr/pgsql-14/include/server/executor/executor.h:612:51: note: expected 'ResultRelInfo *' but argument is of type 'TupleTableSlot *'
612 | extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
concurrent.c:305:96: warning: passing argument 2 of 'ExecInsertIndexTuples' from incompatible pointer type [-Wincompatible-pointer-types]
305 | iistate->estate,
| ~~~~~~~^~~~~~~~
| |
| EState *
In file included from concurrent.c:17:
/usr/pgsql-14/include/server/executor/executor.h:613:84: note: expected 'TupleTableSlot *' but argument is of type 'EState *'
613 | TupleTableSlot *slot, EState *estate,
| ~~~~~~~~~~~~~~~~^~~~
concurrent.c:301:35: error: too few arguments to function 'ExecInsertIndexTuples'
301 | recheck = ExecInsertIndexTuples(slot,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from concurrent.c:17:
/usr/pgsql-14/include/server/executor/executor.h:612:14: note: declared here
612 | extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
| ^~~~~~~~~~~~~~~~~~~~~
concurrent.c:400:73: warning: passing argument 1 of 'ExecInsertIndexTuples' from incompatible pointer type [-Wincompatible-pointer-types]
400 | recheck = ExecInsertIndexTuples(slot,
| ^~~~
| |
| TupleTableSlot *
In file included from concurrent.c:17:
/usr/pgsql-14/include/server/executor/executor.h:612:51: note: expected 'ResultRelInfo *' but argument is of type 'TupleTableSlot *'
612 | extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
concurrent.c:404:112: warning: passing argument 2 of 'ExecInsertIndexTuples' from incompatible pointer type [-Wincompatible-pointer-types]
404 | iistate->estate,
| ~~~~~~~^~~~~~~~
| |
| EState *
In file included from concurrent.c:17:
/usr/pgsql-14/include/server/executor/executor.h:613:84: note: expected 'TupleTableSlot *' but argument is of type 'EState *'
613 | TupleTableSlot *slot, EState *estate,
| ~~~~~~~~~~~~~~~~^~~~
concurrent.c:400:51: error: too few arguments to function 'ExecInsertIndexTuples'
400 | recheck = ExecInsertIndexTuples(slot,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from concurrent.c:17:
/usr/pgsql-14/include/server/executor/executor.h:612:14: note: declared here
612 | extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
| ^~~~~~~~~~~~~~~~~~~~~
concurrent.c: In function 'get_index_insert_state':
concurrent.c:513:47: error: 'EState' has no member named 'es_result_relation_info'; did you mean 'es_result_relations'?
513 | estate->es_result_relations = estate->es_result_relation_info =
| ^~~~~~~~~~~~~~~~~~~~~~~
| es_result_relations
concurrent.c:515:17: error: 'EState' has no member named 'es_num_result_relations'; did you mean 'es_result_relations'?
515 | estate->es_num_result_relations = 1;
| ^~~~~~~~~~~~~~~~~~~~~~~
| es_result_relations
make[1]: *** [: concurrent.o] Error 1
make[1]: *** Waiting for unfinished jobs....
pgstatapprox.c: In function 'statapprox_heap':
pgstatapprox.c:85:22: warning: implicit declaration of function 'GetOldestXmin' [-Wimplicit-function-declaration]
85 | OldestXmin = GetOldestXmin(rel, PROCARRAY_FLAGS_VACUUM);
| ^~~~~~~~~~~~~
pgstatapprox.c:85:41: error: 'PROCARRAY_FLAGS_VACUUM' undeclared (first use in this function)
85 | OldestXmin = GetOldestXmin(rel, PROCARRAY_FLAGS_VACUUM);
| ^~~~~~~~~~~~~~~~~~~~~~
pgstatapprox.c:85:41: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [: pgstatapprox.o] Error 1
pg_squeeze.c: In function 'setup_decoding':
pg_squeeze.c:909:9: error: too few arguments to function 'ReplicationSlotCreate'
909 | ReplicationSlotCreate(buf->data, true, RS_EPHEMERAL);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/pgsql-14/include/server/replication/logical.h:15,
from pg_squeeze.h:28,
from pg_squeeze.c:10:
/usr/pgsql-14/include/server/replication/slot.h:206:13: note: declared here
206 | extern void ReplicationSlotCreate(const char *name, bool db_specific,
| ^~~~~~~~~~~~~~~~~~~~~
pg_squeeze.c: In function 'build_historic_snapshot':
pg_squeeze.c:1932:21: error: 'MyPgXact' undeclared (first use in this function)
1932 | xmin_save = MyPgXact->xmin;
| ^~~~~~~~
pg_squeeze.c:1932:21: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [: pg_squeeze.o] Error 1
concurrent.c:308:15: error: too few arguments to function call, expected 7, have 5
NIL);
^
/usr/pgsql-14/include/server/executor/executor.h:612:14: note: 'ExecInsertIndexTuples' declared here
extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
^
concurrent.c:407:17: error: too few arguments to function call, expected 7, have 5
NIL);
^
/usr/pgsql-14/include/server/executor/executor.h:612:14: note: 'ExecInsertIndexTuples' declared here
extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
^
concurrent.c:513:40: error: no member named 'es_result_relation_info' in 'struct EState'; did you mean 'es_result_relations'?
estate->es_result_relations = estate->es_result_relation_info =
^~~~~~~~~~~~~~~~~~~~~~~
es_result_relations
/usr/pgsql-14/include/server/nodes/execnodes.h:574:18: note: 'es_result_relations' declared here
ResultRelInfo *es_result_relations; / Array of per-range-table-entry
^
concurrent.c:515:10: error: no member named 'es_num_result_relations' in 'struct EState'
estate->es_num_result_relations = 1;
~~~~~~ ^
4 errors generated.
make[1]: *** [/usr/pgsql-14/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: concurrent.bc] Error 1
pgstatapprox.c:85:15: warning: implicit declaration of function 'GetOldestXmin' is invalid in C99 [-Wimplicit-function-declaration]
OldestXmin = GetOldestXmin(rel, PROCARRAY_FLAGS_VACUUM);
^
pgstatapprox.c:85:34: error: use of undeclared identifier 'PROCARRAY_FLAGS_VACUUM'
OldestXmin = GetOldestXmin(rel, PROCARRAY_FLAGS_VACUUM);
^
1 warning and 1 error generated.
make[1]: *** [/usr/pgsql-14/lib/pgxs/src/makefiles/../../src/Makefile.global:1051: pgstatapprox.bc] Error 1
pg_squeeze.c:909:53: error: too few arguments to function call, expected 4, have 3
ReplicationSlotCreate(buf->data, true, RS_EPHEMERAL);
~~~~~~~~~~~~~~~~~~~~~ ^
/usr/pgsql-14/include/server/replication/slot.h:206:13: note: 'ReplicationSlotCreate' declared here
extern void ReplicationSlotCreate(const char *name, bool db_specific,
^
pg_squeeze.c:1932:14: error: use of undeclared identifier 'MyPgXact'
xmin_save = MyPgXact->xmin;
^
pg_squeeze.c:1933:2: error: use of undeclared identifier 'MyPgXact'
MyPgXact->xmin = InvalidTransactionId;
^
pg_squeeze.c:1945:2: error: use of undeclared identifier 'MyPgXact'
MyPgXact->xmin = xmin_save;
^
4 errors generated.
make[1]: *** [/usr/pgsql-14/li

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions