pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <amit.kapila16@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: smithpb2250@gmail.com
Cc: bharath.rupireddyforpostgres@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: A recent message added to pg_upgade
Date: Tue, 8 Jul 2025 17:24:33 +0530
Message-ID: <CAA4eK1+3uDWJ8NkO2YN340Ef4QhCuqsAn-EASFuiePWnP5GwfQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiTN-sWnPNpj6CtB1Ud5uBNR8PWe3mhXN2fJD=h7qQ6e2_iZQ@mail.gmail.com>
References: <20231102.115834.1012152975995247837.horikyota.ntt@gmail.com>
	<202311091039.of6jf7bs3cjd@alvherre.pgsql>
	<CAA4eK1+E-2ZsUmz1FELvxEhi=juxFHRBRKaCdCzhQhy+ybWRrQ@mail.gmail.com>
	<219561.1751826409@sss.pgh.pa.us>
	<CAFiTN-vGh+ei8ypT_6BuZ87mhv6v5OwuQ1DhoZo1W-T_YfKLqA@mail.gmail.com>
	<CAFiTN-u9iuVqRL41ZS85XSuV0ehRi5qMXZ3JjzMJOxAEg1H=xg@mail.gmail.com>
	<436599.1751910776@sss.pgh.pa.us>
	<CAFiTN-vqo6z90as7FEW6zE6E4nKu2J7+JtYJ2uNsNLQf-+1=Rg@mail.gmail.com>
	<CAA4eK1L_wY8rNnM1pjc7Qge6pm7DJ0sQPUfwX_4L5ZAXOwGuGg@mail.gmail.com>
	<CAFiTN-sWnPNpj6CtB1Ud5uBNR8PWe3mhXN2fJD=h7qQ6e2_iZQ@mail.gmail.com>

On Tue, Jul 8, 2025 at 4:49 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> On Tue, Jul 8, 2025 at 2:29 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Tue, Jul 8, 2025 at 11:32 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > >
> > > On Mon, Jul 7, 2025 at 11:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > > >
> > >
> > > > There's a bigger picture here, though.  The fundamental thing that
> > > > I find wrong with the current code is that knowledge of and
> > > > responsibility for this max_slot_wal_keep_size hack is spread across
> > > > both pg_upgrade and the server.  It would be better if it were on
> > > > just one side.  Now, unless we want to change that Assert that
> > > > 8bfb231b4 put into InvalidatePossiblyObsoleteSlot(), the server side
> > > > is going to be aware of this decision.  So I'm inclined to think
> > > > that we should silently enforce max_slot_wal_keep_size = -1 in
> > > > binary-upgrade mode in the server's GUC check hook, and then remove
> > > > knowledge of it from pg_upgrade altogether.  Maybe the same for
> > > > idle_replication_slot_timeout, which really has got the same issue
> > > > that we don't want users overriding that choice.
> > >
> > > Yeah this change makes sense,
> > >
> >
> > Agreed.
> >
> > One other idea to achieve similar functionality is that during
> > BinaryUpgrade, avoid removing WAL due to max_slot_wal_keep_size, and
> > also skip InvalidateObsoleteReplicationSlots. The one advantage of
> > such a change is that after this, we can remove Assert in
> > InvalidatePossiblyObsoleteSlot, remove check_hook functions for GUCs
> > max_slot_wal_keep_size and idle_replication_slot_timeout, and remove
> > special settings for these GUCs in pg_upgrade.
>
> Yeah that could also be possible, not sure which one is better though,
> with this idea we will have to put BinaryUpgrade check in KeepLogSeg()
> as well as in InvalidateObsoleteReplicationSlots() whereas forcing the
> GUC to be -1 during binary upgrade we just need check at one place.
>

But OTOH, as mentioned, we can remove all other codes like check_hooks
and probably assert as well.

-- 
With Regards,
Amit Kapila.





view thread (89+ messages)  latest in thread

Message-ID: <CAA4eK1+3uDWJ8NkO2YN340Ef4QhCuqsAn-EASFuiePWnP5GwfQ@mail.gmail.com>
Permalink:  ../CAA4eK1+3uDWJ8NkO2YN340Ef4QhCuqsAn-EASFuiePWnP5GwfQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CAA4eK1+3uDWJ8NkO2YN340Ef4QhCuqsAn-EASFuiePWnP5GwfQ@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: amit.kapila16@gmail.com, dilipbalaut@gmail.com, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, horikyota.ntt@gmail.com, smithpb2250@gmail.com, bharath.rupireddyforpostgres@gmail.com
  Subject: Re: A recent message added to pg_upgade
  In-Reply-To: <CAA4eK1+3uDWJ8NkO2YN340Ef4QhCuqsAn-EASFuiePWnP5GwfQ@mail.gmail.com>
  References: <20231102.115834.1012152975995247837.horikyota.ntt@gmail.com> <202311091039.of6jf7bs3cjd@alvherre.pgsql> <CAA4eK1+E-2ZsUmz1FELvxEhi=juxFHRBRKaCdCzhQhy+ybWRrQ@mail.gmail.com> <219561.1751826409@sss.pgh.pa.us> <CAFiTN-vGh+ei8ypT_6BuZ87mhv6v5OwuQ1DhoZo1W-T_YfKLqA@mail.gmail.com> <CAFiTN-u9iuVqRL41ZS85XSuV0ehRi5qMXZ3JjzMJOxAEg1H=xg@mail.gmail.com> <436599.1751910776@sss.pgh.pa.us> <CAFiTN-vqo6z90as7FEW6zE6E4nKu2J7+JtYJ2uNsNLQf-+1=Rg@mail.gmail.com> <CAA4eK1L_wY8rNnM1pjc7Qge6pm7DJ0sQPUfwX_4L5ZAXOwGuGg@mail.gmail.com> <CAFiTN-sWnPNpj6CtB1Ud5uBNR8PWe3mhXN2fJD=h7qQ6e2_iZQ@mail.gmail.com> <CAA4eK1+3uDWJ8NkO2YN340Ef4QhCuqsAn-EASFuiePWnP5GwfQ@mail.gmail.com>

* 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