pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: jorsol@gmail.com
Subject: BUG #18979: pg_upgrade to PG17 fails if max_slot_wal_keep_size is not set to -1
Date: Sun, 06 Jul 2025 13:58:20 +0000
Message-ID: <18979-a1b7fdbb7cd181c6@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18979
Logged by:          Jorge Solorzano
Email address:      jorsol@gmail.com
PostgreSQL version: 17.5
Operating system:   Linux
Description:        

Steps to Reproduce:
1. On a PostgreSQL 16 cluster, set max_slot_wal_keep_size = 500 (or any
non-default value).
2. Initdb a new PostgreSQL 17 cluster.
3. Copy the postgresql.conf from 16 to 17.
4. Attempt to perform a binary upgrade to PostgreSQL 17 using pg_upgrade
--check.
Expected Behavior:
pg_upgrade should automatically override max_slot_wal_keep_size to -1 as
required for upgrade mode.
Actual Behavior:
The upgrade fails with the following error:
command: "/usr/pgsql-17/bin/pg_ctl" -w -l
"/var/lib/pgsql/17/data/pg_upgrade_output.d/20250706T152559.441/log/pg_upgrade_server.log"
-D "/var/lib/pgsql/17/data" -o "-p 50432 -b -c synchronous_commit=off -c
fsync=off -c full_page_writes=off -c max_slot_wal_keep_size=-1  -c
listen_addresses='' -c unix_socket_permissions=0700 -c
unix_socket_directories='/var/lib/pgsql'" start >>
"/var/lib/pgsql/17/data/pg_upgrade_output.d/20250706T152559.441/log/pg_upgrade_server.log"
2>&1
waiting for server to start....2025-07-06 13:25:59.929 GMT [9439] LOG:
invalid value for parameter "max_slot_wal_keep_size": 500
2025-07-06 13:25:59.929 GMT [9439] DETAIL:  "max_slot_wal_keep_size" must be
set to -1 during binary upgrade mode.
2025-07-06 15:25:59.930 CEST [9439] FATAL:  configuration file
"/var/lib/pgsql/17/data/postgresql.conf" contains errors
 stopped waiting
pg_ctl: could not start server
Additional Context:
While pg_upgrade does pass other required parameters like -c
max_slot_wal_keep_size=-1 on the command line when starting the new cluster
in upgrade mode, the value in postgresql.conf appears to override this,
leading to startup failure.
It would be helpful if pg_upgrade temporarily overrides the setting
correctly, regardless of the static config.



view thread (6+ messages)  latest in thread

Message-ID: <18979-a1b7fdbb7cd181c6@postgresql.org>
Permalink:  ../18979-a1b7fdbb7cd181c6@postgresql.org/
Also on:    postgresql.org/message-id/18979-a1b7fdbb7cd181c6@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, jorsol@gmail.com
  Subject: Re: BUG #18979: pg_upgrade to PG17 fails if max_slot_wal_keep_size is not set to -1
  In-Reply-To: <18979-a1b7fdbb7cd181c6@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox