Re: Make relfile tombstone files conditional on WAL level

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make relfile tombstone files conditional on WAL level
Date: 2022-03-08 05:02:24
Message-ID: CAFiTN-tVRPgnU-AwN4Nqit_xfWePf0qZgYDttcscDk1anPoLCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 8, 2022 at 1:27 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> > The only part I do not like in the patch is that before this patch we
> > could directly access the buftag->rnode. But since now we are not
> > having directly relfilenode as part of the buffertag and instead of
> > that we are keeping individual fields (i.e. dbOid, tbsOid and relNode)
> > in the buffer tag. So if we have to directly get the relfilenode we
> > need to generate it. However those changes are very limited to just 1
> > or 2 file so maybe not that bad.
>
> You're talking here about just needing to introduce BufTagGetFileNode
> and BufTagSetFileNode, or something else? I don't find those macros to
> be problematic.

Yeah, I was talking about BufTagGetFileNode macro only. The reason I
did not like it is that earlier we could directly use buftag->rnode,
but now whenever we wanted to use rnode first we need to use a
separate variable for preparing the rnode using BufTagGetFileNode
macro. But these changes are very localized and a very few places so
I don't have much problem with those.

>
> BufTagSetFileNode could maybe assert that the OID isn't too big,
> though. We should ereport() before we get to this point if we somehow
> run out of values, but it might be nice to have a check here as a
> backup.

Yeah, we could do that, I will do that in the next version. Thanks.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-03-08 05:15:43 Re: WIP: WAL prefetch (another approach)
Previous Message Peter Smith 2022-03-08 05:00:45 Re: Handle infinite recursion in logical replication setup