From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: jorsol@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18979: pg_upgrade to PG17 fails if max_slot_wal_keep_size is not set to -1
Date: Sun, 06 Jul 2025 13:53:54 -0400
Message-ID: <215701.1751824434@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaH2T+Kk55SzwG5y0CtSVxyrqO-iWek54QP4YX2AWJW3w@mail.gmail.com>
References: <18979-a1b7fdbb7cd181c6@postgresql.org>
<200807.1751815611@sss.pgh.pa.us>
<CAKFQuwaH2T+Kk55SzwG5y0CtSVxyrqO-iWek54QP4YX2AWJW3w@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sun, Jul 6, 2025 at 8:26 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> However, maybe instead of having check_max_slot_wal_keep_size
>> throw an error about this, we could make it just silently keep
>> the value as -1.
> Can't we just move this to postmaster.c ~ line 850 ?
max_slot_wal_keep_size is marked PGC_SIGHUP, so in principle it
could be changed after postmaster start. So if we want a server-side
defense, I don't believe checking at postmaster start is adequate.
In practice, as long as pg_upgrade provides that -c switch, I don't
believe any other GUC source that is allowed to set a PGC_SIGHUP
GUC would override the -c switch. So the need for any server-side
defense isn't obvious to me.
> This seems no different than wal_level and summarize_wal having a
> co-dependency such that intermediate invalid states must be allowed to
> exist so long as what the server ends up running under is valid.
I think that code doesn't do what its author hoped :-(
Anyway, I found the thread for commit 8bfb231b4 which installed
this code [1], and I'm going to go complain there.
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/20231027.115759.2206827438943188717.horikyota.ntt%40gmail...
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: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, jorsol@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18979: pg_upgrade to PG17 fails if max_slot_wal_keep_size is not set to -1
In-Reply-To: <215701.1751824434@sss.pgh.pa.us>
* 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