Re: question about zeroes in the wal file names - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: question about zeroes in the wal file names
Date
Msg-id 575bbf91-8666-f573-1d8b-6bfda5e39195@2ndquadrant.com
Whole thread Raw
In response to question about zeroes in the wal file names  (Luca Ferrari <fluca1978@gmail.com>)
List pgsql-general
On 2019-08-18 16:17, Luca Ferrari wrote:
> I'm just curious to better understand the naming convention behind wal
> files, because I've seen on a system of mine that the wals created
> were:
> 
> 000000050000020E000000FF
>  000000050000020F00000000
> 
> while I was expecting 20E0x100.

You are in principle correct.  This naming system is a historical
accident.  The actual LSN associated with the first file is

0000020EFF000000

and so the next one is naturally

0000020F00000000

The reason the zeroes are in there comes from a time when PostgreSQL
didn't fully support 64-bit integers, and the LSNs and the files were
tracked internally as pairs of 32-bit integers.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-general by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: question about zeroes in the wal file names
Next
From: John Donath
Date:
Subject: pg_basebackup exit codes