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

From: Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]
Date: 2022-04-08 08:47:26
Message-ID: a3c59975234c19eff08cb3b53dcd52ce32bf88d1.camel@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, 2022-04-08 at 08:47 +0900, Michael Paquier wrote:
> On Thu, Apr 07, 2022 at 11:19:15AM -0400, Robert Haas wrote:
> > Here are patches for master and v14 to do things this way.
> > Comments?
>
> Thanks for the patches.  They look correct.

+1, looks good to me and addresses my specific original concern.

> For ~14, I'd rather avoid
> the code duplication done by GetVirtualXIDsDelayingChkptEnd() and
> HaveVirtualXIDsDelayingChkpt() that could be avoided with an extra
> bool argument to the existing routine.  The same kind of duplication
> happens with GetVirtualXIDsDelayingChkpt() and
> GetVirtualXIDsDelayingChkptEnd().

I agree with Michael, it would be nice to not duplicate the code, but
use a common underlying method. A modified patch is attached.

Best Regards

Markus

Attachment Content-Type Size
0001-Rethink-the-delay-v2.patch text/x-patch 18.4 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2022-04-08 09:34:44 pgsql: Check XLogRecHasBlockRef() before XLogRecHasBlockImage().
Previous Message Jeff Davis 2022-04-08 08:37:13 pgsql: Fix buildfarm failure from commit 2258e76f90.

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2022-04-08 08:54:28 Re: Temporary file access API
Previous Message Dave Page 2022-04-08 07:56:25 Re: Windows now has fdatasync()