public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Christoph Berg <[email protected]>
Cc: [email protected]
Subject: Re: pg_upgradecluster and synchronous replication
Date: Thu, 15 Jan 2026 05:40:26 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
On Wed, 2026-01-14 at 20:54 +0100, I wrote:
> On Wed, 2026-01-14 at 20:39 +0100, Christoph Berg wrote:
> >
> > Maybe we should instead change the analyze hook script to do that
> > internally? Setting PGOPTIONS should be enough:
> >
> > PGOPTIONS="-csynchronous_commit=local"
> >
> >
> > There is already some code in pg_upgradecluster that works around
> > black magic problems:
> >
> > # ensure we can upgrade DBs with default read-only transactions
> > $ENV{PGOPTIONS} .= " -cdefault_transaction_read_only=off";
> >
> > This would just add one more wart of that kind.
>
> That looks like a better way to do it, I agree.
>
>
> at makes me wonder. I don't think that it is a great idea to start the cluster for
> production with "synchronous_commit" set to a non-standard value. That would mask the
> problem initially, but whenever the cluster is restarted, the parameter is back to its
> original value, and suddenly things will stop working.
Forget that: I missed that with PGOPTIONS, the setting is only changed for
the database session that performs the ANALYZE, not for the entire server
runtime. Yes, I think that is the proper solution!
Yours,
Laurenz Albe
view thread (7+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pg_upgradecluster and synchronous replication
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox