Re: API stability

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: robertmhaas@gmail.com
Cc: markus.wanner@enterprisedb.com, pgsql-hackers@postgresql.org
Date: 2022-04-06T07:45:21Z
Lists: pgsql-hackers

Attachments

At Wed, 06 Apr 2022 15:53:32 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> At Wed, 06 Apr 2022 15:31:53 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> > At Wed, 06 Apr 2022 14:30:37 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> > > So if we don't want to move any member in PGPROC, we do:
> > > 
> > > 14: after statusFlags.
> > > 13: after delayChkpt.
> > > 12-10: after syncRepState (and before syncRepLinks).
> > > 
> > > If we allow to shift some members, the new flag can be placed more
> > > saner place.
> > > 
> > > 14: after delayChkpt ((uint8)statusFlags moves forward by 1 byte)
> > > 13: after delayChkpt (no member moves)
> > > 12-10: after subxids ((bool)procArrayGroupMember moves forward by 1 byte)
> > > 
> > > I continue working on the last direction above.
> > 
> > Hmm. That is ABI break.  I go with the first way.
> 
> By the way, the patch for -14 changed the sigunature of two public
> functions.
> 
> -GetVirtualXIDsDelayingChkpt(int *nvxids)
> +GetVirtualXIDsDelayingChkpt(int *nvxids, int type)
> 
> -HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids)
> +HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids, int type)
> 
> Do I need to restore the signature?

For master, renamed delayChkpt to delayChkptFlags and changed it to uint8.

For 14, restored delayChkpt to bool and added delayChkptEnd into a gap in PGPROC, then restored the signature of the two functions above to before the patch. Then added a new functions ..DelayingChkptEnd().

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Commits

  1. Rethink the delay-checkpoint-end mechanism in the back-branches.

  2. Rename delayChkpt to delayChkptFlags.

  3. Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.