The following bug has been logged on the website:
Bug reference: 19017
Logged by: Todd Cook
Email address: cookt@blackduck.com
PostgreSQL version: 18beta2
Operating system: CentOS Stream 9
Description:
When trying a basic pg_upgrade from 17.5 to 18.0beta2 (at
67a2fbb8f9e9f75df08208e75da412c43a814688), it fails with
"/usr/pgsql-17/bin/pg_ctl" -w -l
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log" -D
"/u4/tac/hub-data/pgsql-17/data" -o "-p 50432 -b -c listen_addresses='' -c
unix_socket_permissions=0700 -c
unix_socket_directories='/u2/tac/hub/pgsql-18'" start >>
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log"
2>&1
*failure*
There were problems executing ""/usr/pgsql-17/bin/pg_ctl" -w -l
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log" -D
"/u4/tac/hub-data/pgsql-17/data" -o "-p 50432 -b -c listen_addresses='' -c
unix_socket_permissions=0700 -c
unix_socket_directories='/u2/tac/hub/pgsql-18'" start >>
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log"
2>&1"
Consult the last few lines of
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log" for
the probable cause of the failure.
The referenced log file contains
command: "/usr/pgsql-17/bin/pg_ctl" -w -l
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log" -D
"/u4/tac/hub-data/pgsql-17/data" -o "-p 50432 -b -c listen_addresses='' -c
unix_socket_permissions=0700 -c
unix_socket_directories='/u2/tac/hub/pgsql-18'" start >>
"data/pg_upgrade_output.d/20250811T113136.220/log/pg_upgrade_server.log"
2>&1
waiting for server to start....2025-08-11 11:31:36.664 EDT [619244] LOG:
invalid value for parameter "max_slot_wal_keep_size": 8192
2025-08-11 11:31:36.664 EDT [619244] DETAIL: "max_slot_wal_keep_size" must
be set to -1 during binary upgrade mode.
2025-08-11 11:31:36.664 EDT [619244] FATAL: configuration file
"/u4/tac/hub-data/pgsql-17/data/postgresql.auto.conf" contains errors
stopped waiting
pg_ctl: could not start server
The above is from a real upgrade attempt. However, it can be reproduced
with
# PG 17 commands from memory
mkdir -p pg17/data
chmod 700 pg17/data
/usr/pgsql-17/bin/initdb --locale=C pg17/data
echo "max_slot_wal_keep_size = '8GB'" >> pg17/data/postgresql.auto.conf
mkdir pg18
cd pg18
mkdir data
chmod 700 data
pg_18.67a2fbb8f9e9f/bin/initdb --locale=C --no-data-checksums data
pg_18.67a2fbb8f9e9f/bin/pg_upgrade -v -d ../pg17/data -D data -b
/usr/pgsql-17/bin -B pg_18.67a2fbb8f9e9f/bin
The same steps migrating from 16 to 17 work without problems. This is easy
enough to workaround, but if the change is intentional, it probably deserves
a mention in the release notes.