EnterpriseDB / repmgr

A lightweight replication manager for PostgreSQL (Postgres)
https://repmgr.org/
Other
1.57k stars 251 forks source link

PostgreSQL 17 support #856

Closed devrimgunduz closed 1 week ago

devrimgunduz commented 3 months ago

Hi,

5.4.1 fails to build against PostgreSQL 17. v17 beta2 is already out. Can you please take a look?

Thanks, Devrim

repmgr-action-primary.c: In function ‘do_primary_unregister’: repmgr-action-primary.c:439:37: warning: declaration of ‘primary_node_info’ shadows a previous local [-Wshadow=compatible-local] 439 | t_node_info primary_node_info = T_NODE_INFO_INITIALIZER; | ^~~~~ repmgr-action-primary.c:252:21: note: shadowed declaration is here 252 | t_node_info primary_node_info = T_NODE_INFO_INITIALIZER; | ^~~~~ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -std=gnu89 -I/usr/pgsql-17/include/internal -I/usr/pgsql-17/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o controldata.o controldata.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -std=gnu89 -I/usr/pgsql-17/include/internal -I/usr/pgsql-17/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o dirutil.o dirutil.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -std=gnu89 -I/usr/pgsql-17/include/internal -I/usr/pgsql-17/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o compat.o compat.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -std=gnu89 -I/usr/pgsql-17/include/internal -I/usr/pgsql-17/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o dbutils.o dbutils.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -std=gnu89 -I/usr/pgsql-17/include/internal -I/usr/pgsql-17/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o sysutils.o sysutils.c repmgrd-physical.c: In function ‘monitor_streaming_standby’: repmgrd-physical.c:1774:41: warning: declaration of ‘upstream_check_result’ shadows a previous local [-Wshadow=compatible-local] 1774 | bool upstream_check_result; | ^~~~~ repmgrd-physical.c:1550:22: note: shadowed declaration is here 1550 | bool upstream_check_result; | ^~~~~ repmgrd-physical.c:1897:73: warning: declaration of ‘degraded_monitoring_elapsed’ shadows a previous local [-Wshadow=compatible-local] 1897 | int degraded_monitoring_elapsed; | ^~~~~~~ repmgrd-physical.c:1773:49: note: shadowed declaration is here 1773 | int degraded_monitoring_elapsed = calculate_elapsed(degraded_monitoring_start); | ^~~~~~~ repmgrd-physical.c:1956:73: warning: declaration of ‘degraded_monitoring_elapsed’ shadows a previous local [-Wshadow=compatible-local] 1956 | int degraded_monitoring_elapsed = calculate_elapsed(degraded_monitoring_start); | ^~~~~~~ repmgrd-physical.c:1773:49: note: shadowed declaration is here 1773 | int degraded_monitoring_elapsed = calculate_elapsed(degraded_monitoring_start); | ^~~~~~~ repmgr-action-node.c: In function ‘do_node_status’: repmgr-action-node.c:397:43: warning: declaration of ‘cell’ shadows a previous local [-Wshadow=compatible-local] 397 | KeyValueListCell cell = NULL; | ^~~~ repmgr-action-node.c:82:27: note: shadowed declaration is here 82 | KeyValueListCell cell = NULL; | ^~~~ repmgr-action-node.c:527:43: warning: declaration of ‘cell’ shadows a previous local [-Wshadow=compatible-local] 527 | KeyValueListCell cell = NULL; | ^~~~ repmgr-action-node.c:82:27: note: shadowed declaration is here 82 | KeyValueListCell cell = NULL; | ^~~~ repmgr-action-node.c: In function ‘do_node_rejoin’: repmgr-action-node.c:2961:61: warning: declaration of ‘statbuf’ shadows a previous local [-Wshadow=compatible-local] 2961 | struct stat statbuf; | ^~~ repmgr-action-node.c:2545:21: note: shadowed declaration is here 2545 | struct stat statbuf; | ^~~ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -std=gnu89 -I/usr/pgsql-17/include/internal -I/usr/pgsql-17/include -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -c -o pgbackupapi.o pgbackupapi.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -fvisibility=hidden -shared -o repmgr.so repmgr.o -lcurl -ljson-c -L/usr/pgsql-17/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -L/usr/lib64 -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-17/lib',--enable-new-dtags -fvisibility=hidden -L/usr/pgsql-17/lib -lpq repmgr-action-standby.c: In function ‘do_standby_clone’: repmgr-action-standby.c:538:49: warning: declaration of ‘r’ shadows a previous local [-Wshadow=compatible-local] 538 | int r; | ^ repmgr-action-standby.c:171:33: note: shadowed declaration is here 171 | int r = 0; | ^ repmgr-action-standby.c:765:21: warning: declaration of ‘r’ shadows a previous local [-Wshadow=compatible-local] 765 | int r; | ^ repmgr-action-standby.c:171:33: note: shadowed declaration is here 171 | int r = 0; | ^ repmgr-action-standby.c: In function ‘do_standby_switchover’: repmgr-action-standby.c:3930:33: warning: declaration of ‘replication_info’ shadows a previous local [-Wshadow=compatible-local] 3930 | ReplInfo replication_info; | ^~~~ repmgr-action-standby.c:3679:25: note: shadowed declaration is here 3679 | ReplInfo replication_info; | ^~~~ repmgr-action-standby.c:4787:21: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 4787 | int i = 0; | ^ repmgr-action-standby.c:3670:33: note: shadowed declaration is here 3670 | i; | ^ repmgr-action-standby.c:5102:41: warning: declaration of ‘command_success’ shadows a previous local [-Wshadow=compatible-local] 5102 | bool command_success; | ^~~~~~~ repmgr-action-standby.c:3671:25: note: shadowed declaration is here 3671 | bool command_success = false; | ^~~~~~~ repmgr-action-standby.c:5672:29: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 5672 | int i = 0; | ^ repmgr-action-standby.c:3670:33: note: shadowed declaration is here 3670 | i; | ^ repmgr-action-standby.c: In function ‘check_upstream_config’: repmgr-action-standby.c:6508:41: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 6508 | int i; | ^ repmgr-action-standby.c:6224:33: note: shadowed declaration is here 6224 | int i; | ^ repmgr-action-standby.c: In function ‘check_sibling_nodes’: repmgr-action-standby.c:8474:43: warning: declaration of ‘cell’ shadows a previous local [-Wshadow=compatible-local] 8474 | NodeInfoListCell cell; | ^~~~ repmgr-action-standby.c:8461:27: note: shadowed declaration is here 8461 | NodeInfoListCell cell; | ^~~~ repmgr-client.c: In function ‘copy_remote_files’: repmgr-client.c:3185:51: error: ‘PG_TEMP_FILE_PREFIX’ undeclared (first use in this function) 3185 | PG_TEMP_FILE_PREFIX); | ^~~~~~~ repmgr-client.c:3185:51: note: each undeclared identifier is reported only once for each function it appears in make[1]: [: repmgr-client.o] Error 1 make[1]: Waiting for unfinished jobs.... dbutils.c: In function ‘get_ready_archive_files’: dbutils.c:1627:29: warning: declaration of ‘statbuf’ shadows a previous local [-Wshadow=compatible-local] 1627 | struct stat statbuf; | ^~~ dbutils.c:1585:21: note: shadowed declaration is here 1585 | struct stat statbuf; | ^~~

pdihe commented 2 months ago

PostgreSQL 17 RC1 is here!

Any chance to get support for this major release soon? 😀

devrimgunduz commented 1 month ago

ping

martinmarques commented 1 month ago

PostgreSQL 17 RC1 is here!

Any chance to get support for this major release soon? 😀

I'm always opened to contributions. 😉

fmbiete commented 1 month ago

I'm always opened to contributions. 😉

There you go! This one was an easy pick...

javsalgar commented 1 month ago

Hi! Any chance this can be prioritized? It is blocking our release process.

jasonchenTJ commented 1 month ago

@fmbiete Hi Bro, what's going on for your change?

javsalgar commented 3 weeks ago

Anything preventing this PR https://github.com/EnterpriseDB/repmgr/pull/863 to be merged?

martinmarques commented 2 weeks ago

Testing, and internal work. We have a plan to make a new release with this PR and some other minor changes

grahamb commented 1 week ago

Curious why this was closed when PG 17 support is still not available?

javsalgar commented 1 week ago

I imagine it was automatically closed when the associated PR was merged. Is there any expected ETA for the new release?

bennymamo commented 2 days ago

Sorry to bump this again, but is there any news about when this new release with pg17 support is expected to be released? I understand people are busy of course, maybe a vague timeline would help?

martinmarques commented 2 days ago

No date, but we are working on releasing this month