Re: Question about InvalidatePossiblyObsoleteSlot()
suyu.cmj <mengjuan.cmj@alibaba-inc.com>
From: "suyu.cmj" <mengjuan.cmj@alibaba-inc.com>
To: "bertranddrouvot.pg" <bertranddrouvot.pg@gmail.com>
Cc: "michael" <michael@paquier.xyz>,
"bharath.rupireddyforpostgres" <bharath.rupireddyforpostgres@gmail.com>,
"amit.kapila16" <amit.kapila16@gmail.com>,
"pgsql-hackers" <pgsql-hackers@postgresql.org>
Date: 2025-10-09T02:49:39Z
Lists: pgsql-hackers
Hi, Thank you for the reference to commit 818fefd8fd4 and the related discussion thread. I understand the intent of introducing initial_restart_lsn was to preserve a consistent invalidation cause throughout the invalidation loop. However, I still have a few concerns about this design change: 1. I understand the intention to keep the invalidation cause consistent, but If a slot's restart_lsn advances significantly during the invalidation check—indicating it is actively in use—shouldn't we reconsider invalidating it? 2. What potential issues arise if we refrain from invalidating slots whose restart_lsn advances during the invalidation process? Intuitively, an actively used slot that has moved it's restart_lsn beyond the problematic point should not be marked invalid. 3. If the current approach is indeed correct, should we consider making PG15 and earlier consistent with this behavior? The behavioral difference across versions may lead to different operational outcomes in otherwise similar situations. I would appreciate your insights on these points. Best regards, suyu.cmj
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix regression with slot invalidation checks
- e3714dc059db 16.11 landed
- f3fb6bc9feec 17.7 landed
- bf3dba508ee1 18.1 landed
- d43209468906 19 (unreleased) landed
-
Fix race leading to incorrect conflict cause in InvalidatePossiblyObsoleteSlot()
- 818fefd8fd44 17.0 cited