Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: markus.wanner@enterprisedb.com
Cc: robertmhaas@gmail.com, michael@paquier.xyz, tgl@sss.pgh.pa.us,
pgsql-hackers@postgresql.org
Date: 2022-04-12T10:54:58Z
Lists: pgsql-hackers
Attachments
- v2-0001-Fix-ABI-API-break_14.patch (text/x-patch)
(My mailer has been fixed.) At Mon, 11 Apr 2022 21:45:59 +0200, Markus Wanner <markus.wanner@enterprisedb.com> wrote in > On Mon, 2022-04-11 at 15:21 -0400, Robert Haas wrote: > > ... before v13, the commit in question actually > > changed the size of PGXACT, which is really quite bad -- it needs to > > be 12 bytes for performance reasons. And there's no spare bytes > > available, so I think we should follow one of the suggestions that he > > had over in that email thread, and put delayChkptEnd in PGPROC even > > though delayChkpt is in PGXACT. > > This makes sense to me. Kudos to Kyotaro for considering this. > > At first read, this sounded like a trade-off between compatibility and > performance for PG 12 and older. But I realize leaving delayChkpt in > PGXACT and adding just delayChkptEnd to PGPROC is compatible and leaves > PGXACT at a size of 12 bytes. So this sounds like a good approach to > me. Thanks! So, I created the patches for back-patching from 10 to 14. (With fixed a silly bug of the v1-pg14 that HaveVirtualXIDsDelayingChkpt and HaveVirtualXIDsDelayingChkptEnd are inverted..) They revert delayChkpt-related changes made by the patch and add delayChkptEnd stuff. I compared among every pair of the patches for neighbouring versions, to make sure not making the same change in different way and they have the same set of hunks. This version takes the way sharing the common static function (*ChkptGuts) between the functions *Chkpt() and *ChkptEnd(). regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Rethink the delay-checkpoint-end mechanism in the back-branches.
- 48b398943b78 10.21 landed
- 6270ee445040 11.16 landed
- 68e605b9ef37 12.11 landed
- d18c913b786c 13.7 landed
- 10520f434687 14.3 landed
-
Rename delayChkpt to delayChkptFlags.
- f37015a1617d 15.0 landed
-
Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.
- bbace5697df1 14.3 cited