Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: markus(dot)wanner(at)enterprisedb(dot)com
Cc: robertmhaas(at)gmail(dot)com, michael(at)paquier(dot)xyz, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]
Date: 2022-04-12 10:54:58
Message-ID: 20220412.195458.2066037926728685947.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

(My mailer has been fixed.)

At Mon, 11 Apr 2022 21:45:59 +0200, Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)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

Attachment Content-Type Size
v2-0001-Fix-ABI-API-break_14.patch text/x-patch 17.6 KB
v2-0001-Fix-ABI-API-break_13.patch text/x-patch 17.3 KB
v2-0001-Fix-ABI-API-break_12.patch text/x-patch 18.0 KB
v2-0001-Fix-ABI-API-break_11.patch text/x-patch 18.0 KB
v2-0001-Fix-ABI-API-break_10.patch text/x-patch 18.0 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-12 13:21:47 pgsql: adjust_partition_colnos mustn't be called if not needed
Previous Message Thomas Munro 2022-04-12 09:22:12 pgsql: Fix documentation for pg_stat_recovery_prefetch.

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-04-12 10:55:30 Re: Support logical replication of DDLs
Previous Message vignesh C 2022-04-12 10:46:53 Re: Skipping schema changes in publication