Re: Introduce XID age and inactive timeout based replication slot invalidation

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Cc: 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>, Nathan Bossart <nathandbossart(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 14:22:49
Message-ID: 202502111422.xq6cztpgl2lm@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

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.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
Officer Krupke, what are we to do?
Gee, officer Krupke, Krup you! (West Side Story, "Gee, Officer Krupke")

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2025-02-11 14:49:24 Re: Proposal to CREATE FOREIGN TABLE LIKE
Previous Message Bertrand Drouvot 2025-02-11 14:05:18 Re: Move wal_buffers_full to WalUsage (and report it in pgss/explain)