Re: Simplify xlogreader.c with XLogRec* macros

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: 邱宇航 <iamqyh(at)gmail(dot)com>
Cc: Junwang Zhao <zhjwpku(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, tmunro(at)postgresql(dot)org
Subject: Re: Simplify xlogreader.c with XLogRec* macros
Date: 2023-11-27 11:20:03
Message-ID: CALj2ACVr1vkhRDBLOg0vgKZEF877xiS877yj9Nv-57Z_7oCP-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 3, 2023 at 12:01 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Tue, Oct 31, 2023 at 4:12 PM 邱宇航 <iamqyh(at)gmail(dot)com> wrote:
> >
> > >
> > > I thought these can also be rewrite to:
> > >
> > > if (!XLogRecHasBlockRef(record, block_id))
> >
> > Oops, I missed that. New version is attached.
>
> +1. Indeed a reasonable change. The attached v2 patch LGTM.

This patch basically uses the macros introduced by commit 3f1ce97 [1]
more extensively. I don't see a CF entry added for this patch. Please
add one if not added.

[1]
commit 3f1ce973467a0d285961bf2f99b11d06e264e2c1
Author: Thomas Munro <tmunro(at)postgresql(dot)org>
Date: Fri Mar 18 17:45:04 2022 +1300

Add circular WAL decoding buffer, take II.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-11-27 11:27:05 Re: logical decoding and replication of sequences, take 2
Previous Message Amit Kapila 2023-11-27 11:11:07 Re: logical decoding and replication of sequences, take 2