Re: question about zeroes in the wal file names

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: question about zeroes in the wal file names
Дата
Msg-id 575bbf91-8666-f573-1d8b-6bfda5e39195@2ndquadrant.com
обсуждение исходный текст
Ответ на question about zeroes in the wal file names  (Luca Ferrari <fluca1978@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: question about zeroes in the wal file names
Следующее
От: John Donath
Дата:
Сообщение: pg_basebackup exit codes