From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
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-13 17:49:53 |
Message-ID: | 20231113174953.zpapaheza7mseh3q@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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...
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2023-11-13 17:53:27 | Re: COPY TO (FREEZE)? |
Previous Message | Bruce Momjian | 2023-11-13 17:40:49 | Re: Official Windows Installer and Documentation |