Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file
Date: 2022-10-04 06:22:23
Message-ID: CALj2ACUW1ThQOY0UoutrLJQM+TAKEizYsK=dKd21gSb33jjY7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 4, 2022 at 11:47 AM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> > - segs_per_xlogid = (UINT64CONST(0x0000000100000000) / ControlFile.xlog_seg_size);
> > newXlogSegNo = ControlFile.checkPointCopy.redo / ControlFile.xlog_seg_size;
>
> Couldn't we use XLByteToSeg() here?

Yes, we could.

> Other than that, it looks good to me.

Thanks. There are a few more assorted WAL file related things I found,
I will be sending all of them in this thread itself in a while.

--
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 Kyotaro Horiguchi 2022-10-04 06:23:48 Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file
Previous Message Kyotaro Horiguchi 2022-10-04 06:17:06 Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file