reactive-tech / kubegres

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
https://www.kubegres.io
Apache License 2.0
1.32k stars 74 forks source link

Postgres 16 error due to eliminated promote_trigger_file config parameter #162

Closed daku closed 1 year ago

daku commented 1 year ago

root@quiche:~# mk logs mypostgres-2-0 --all-containers 23/09/2023 06:11:18 - Attempting to copy Primary DB to Replica DB... ls: cannot access '/var/lib/postgresql/data/pgdata': No such file or directory 23/09/2023 06:11:18 - Copying Primary DB to Replica DB folder: /var/lib/postgresql/data/pgdata 23/09/2023 06:11:18 - Running: pg_basebackup -R -h mypostgres -D /var/lib/postgresql/data/pgdata -P -U replication; waiting for checkpoint 23134/23134 kB (100%), 0/1 tablespace 23134/23134 kB (100%), 1/1 tablespace 23/09/2023 06:11:18 - Copy completed

PostgreSQL Database directory appears to contain a database; Skipping initialization

2023-09-23 06:17:16.179 GMT [1] FATAL: unrecognized configuration parameter "promote_trigger_file"

alex-arica commented 1 year ago

Thank you for reporting this issue.

Since PostgreSql 16, the feature allowing to promote a Replica using a trigger file defined in the property "promote_trigger_file" was removed by the PostgreSql developers.

We are going to release a new version of Kubegres today which will use the tool provided by Postgres to promote a Replica: "pg_ctl promote".

This change is compatible with the previous versions of PostgreSql.

alex-arica commented 1 year ago

A new version of Kubegres is available compatible with Postgres 16 : https://github.com/reactive-tech/kubegres/releases/tag/v1.17