From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Introduce XID age and inactive timeout based replication slot invalidation |
Date: | 2025-02-11 16:09:26 |
Message-ID: | Z6t2Nnhpb8jxhG2p@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Feb 11, 2025 at 03:22:49PM +0100, Álvaro Herrera wrote:
> I find this proposed patch a bit strange and I feel it needs more
> explanation.
>
> When this thread started, Bharath justified his patches saying that a
> slot that's inactive for a very long time could be problematic because
> of XID wraparound. Fine, that sounds a reasonable feature. If you
> wanted to invalidate slots whose xmins were too old, I would support
> that. He submitted that as his 0004 patch then.
>
> However, he also chose to submit 0003 with invalidation based on a
> timeout. This is far less convincing a feature to me. The
> justification for the time out seems to be that ... it's difficult to
> have a one-size-fits-all value because size of disks vary. (???)
> Or something like that. Really? I mean -- yes, this will prevent
> problems in toy databases when run in developer's laptops. It will not
> prevent any problems in production databases. Do we really want a
> setting that is only useful for toy situations rather than production?
>
>
> Anyway, the thread is way too long, but after some initial pieces were
> committed, Nisha took over and submitting patches derived from Bharath's
> 0003, and at some point the initial 0004 was dropped. But 0004 was the
> more useful one, I thought, so what's going on?
>
> I'm baffled.
I agree, and I am also baffled because I think this discussion has happened
at least once already on this thread. I still feel like the XID-based
parameter makes more sense. For replication slots, two primary concerns
are 1) storage, for which we have max_slot_wal_keep_size and 2) XID
wraparound, for which we don't really have anything today. A timeout might
be useful in some contexts, but if the goal is to prevent wraparound, why
not target that directly?
--
nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Sharma | 2025-02-11 16:18:08 | Re: Orphaned users in PG16 and above can only be managed by Superusers |
Previous Message | Sami Imseih | 2025-02-11 16:07:48 | Re: Proposal to CREATE FOREIGN TABLE LIKE |