pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Peter Smith <smithpb2250@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_upgrade and logical replication
Date: Thu, 2 Nov 2023 14:48:32 +0900
Message-ID: <ZUM4MPXRk4KzI3C2@paquier.xyz> (raw)
In-Reply-To: <CAHut+PsCzt=O3_xkyrskaZ3SMxaXoN4L5Z5CgvaGPNx3mXXxOQ@mail.gmail.com>
References: <20230424072224.qd3awkfrjcanw2pa@jrouhaud>
	<TYAPR01MB5866FE3A990CAE1FFA3F1472F56A9@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<CALDaNm1ZrbHaWpJwwNhDTJocRKWd3rEkgJazuDdZ9Z-WdvonFg@mail.gmail.com>
	<TYAPR01MB5866F1BA00D86EA7EA134348F5F1A@TYAPR01MB5866.jpnprd01.prod.outlook.com>
	<CALDaNm1JzqTreCUrhNu5E1gq7Q8r_u3+FrisyT7moOED=UdoCg@mail.gmail.com>
	<ZQvbV2sdzBY6WEBl@paquier.xyz>
	<CALDaNm0X1WnHot8YWWhpKmzwX-au+gqCSL9J3RicqvAmsm=u1Q@mail.gmail.com>
	<CAA4eK1+uLQ1AFzvQGXk_q8Oh_OoYxJoexuVP7aLocEuO8VzgjA@mail.gmail.com>
	<CALDaNm3ATayLn=YNO5PsXkKF15R_E8j-jEu5gGkv=Od8TBxzEA@mail.gmail.com>
	<CAHut+PsCzt=O3_xkyrskaZ3SMxaXoN4L5Z5CgvaGPNx3mXXxOQ@mail.gmail.com>

On Thu, Nov 02, 2023 at 04:35:26PM +1100, Peter Smith wrote:
> The chance of being able to do so should be small as pg_upgrade uses its
> own port and unix domain directory (customizable as well with
> --socketdir), but just preventing the launcher to start is safer at the
> end, because we are then sure that no changes would ever be applied.
> ~
> "safer at the end" (??)

Well, just safer.

> 2a.
> The comment is one big long sentence. IMO it will be better to break it up.
> 2b.
> Add a blank line between this comment note and the previous one.

Yes, I found that equally confusing when looking at this patch, so
I've edited the patch this way when I was looking at it today.  This
is enough to do the job, so I have applied it for now, before moving
on with the second one of this thread.

> 2c.
> In a recent similar thread [1], they chose to implement a guc_hook to
> prevent a user from overriding this via the command line option during
> the upgrade. Shouldn't this patch do the same thing, for consistency?
> 2d.
> If you do implement such a guc_hook (per #2c above), then should the
> patch also include a test case for getting an ERROR if the user tries
> to override that GUC?

Yeah, that may be something to do, but I am not sure that it is worth
complicating the backend code for the remote case where one enforces
an option while we are already setting a GUC in the upgrade path:
https://www.postgresql.org/message-id/CAA4eK1Lh9J5VLypSQugkdD+H=_5-6p3rOocjo7JbTogcxA2hxg@mail.gmail...

That feels like a lot of extra facility for cases that should never
happen.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (221+ messages)  latest in thread

Message-ID: <ZUM4MPXRk4KzI3C2@paquier.xyz>
Permalink:  ../ZUM4MPXRk4KzI3C2@paquier.xyz/
Also on:    postgresql.org/message-id/ZUM4MPXRk4KzI3C2@paquier.xyz

 · 

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-hackers@postgresql.org
  Cc: michael@paquier.xyz, smithpb2250@gmail.com, vignesh21@gmail.com, amit.kapila16@gmail.com, kuroda.hayato@fujitsu.com, rjuju123@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_upgrade and logical replication
  In-Reply-To: <ZUM4MPXRk4KzI3C2@paquier.xyz>

* 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