From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pg_walfile_name_offset can return inconsistent values |
Date: | 2023-11-25 00:44:25 |
Message-ID: | ZWFDaYEmDNp3HZWi@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 13, 2023 at 02:12:12PM -0500, Bruce Momjian wrote:
> On Mon, Nov 13, 2023 at 09:49:53AM -0800, Andres Freund wrote:
> > Hi,
> >
> > On 2023-11-13 12:14:57 -0500, Bruce Momjian wrote:
> > > +SELECT *
> > > +FROM (values ('0/16ffffff'), ('0/17000000'), ('0/17000001')) as t(lsn),
> > > + LATERAL pg_walfile_name_offset(lsn::pg_lsn),
> > > + LATERAL pg_walfile_name(lsn::pg_lsn);
> > > + lsn | file_name | file_offset | pg_walfile_name
> > > +------------+--------------------------+-------------+--------------------------
> > > + 0/16ffffff | 000000010000000000000016 | 16777215 | 000000010000000000000016
> > > + 0/17000000 | 000000010000000000000017 | 0 | 000000010000000000000017
> > > + 0/17000001 | 000000010000000000000017 | 1 | 000000010000000000000017
> > > +(3 rows)
> >
> > These would break when testing with a different segment size. Today that's not
> > the case...
>
> Okay, test removed in the updated patch.
Patch applied to master.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2023-11-25 00:45:07 | Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements |
Previous Message | Heikki Linnakangas | 2023-11-24 23:19:16 | Re: Relation bulk write facility |