hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.07k stars 112 forks source link

PostgreSQL 15 support #934

Closed devrimgunduz closed 1 year ago

devrimgunduz commented 1 year ago

Hi @DimCitus ,

1.6.4 fails to build against v15 rc1. 15.0 is due in 2 weeks. Can you please take a look?

Thanks!

pgsetup.c: In function 'pg_setup_get_username': pgsetup.c:1361:29: error: implicit declaration of function 'getpwuid'; did you mean 'geteuid'? [-Werror=implicit-function-declaration] 1361 | struct passwd pw = getpwuid(uid); | ^~~~ | geteuid pgsetup.c:1361:29: warning: initialization of 'struct passwd ' from 'int' makes pointer from integer without a cast [-Wint-conversion] In file included from pgsetup.c:27: pgsetup.c:1364:61: error: invalid use of undefined type 'struct passwd' 1364 | log_trace("username found in passwd: %s", pw->pw_name); | ^~ /home/devrim/Documents/Devrim/Projects/repo/pgrpms/rpm/redhat/main/non-common/pg_auto_failover/F-36/pg_auto_failover-1.6.4/src/bin/pg_autoctl/../lib/log/src/log.h:20:63: note: in definition of macro 'log_trace' 20 | #define log_trace(...) log_log(LOG_TRACE, FILE, LINE, __VA_ARGS__) | ^~~ pgsetup.c:1366:46: error: invalid use of undefined type 'struct passwd' 1366 | strlcpy(pgSetup->username, pw->pw_name, sizeof(pgSetup->username)); | ^~ cc1: some warnings being treated as errors

DimCitus commented 1 year ago

See #923.

DimCitus commented 1 year ago

By the way pg_auto_failover v2.0 has now been released with support for Postgres 15. See https://github.com/citusdata/pg_auto_failover/releases/tag/v2.0 for details.