1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add timeline ID to file names generated with pg_waldump --save-fullpage

Not including the timeline IDs to the file names generated by pg_waldump
for the individual blocks saved could cause some of these files to be
overwritten when scanning segments across multiple timelines.  Having
this information is also as much useful as the LSNs, to be able to know
from exactly which WAL segment a block is comes from.

While on it, this fixes a few comments in the tests, where the format of
the file was not described as matching with the reality.

Reported-by: Fujii Masao
Reviewed-by: Kyotaro Horiguchi, David Christensen
Discussion: https://postgr.es/m/ZJp921+nITFnvBVS@paquier.xyz
This commit is contained in:
Michael Paquier
2023-06-28 16:26:55 +09:00
parent fc55c7ff8d
commit b381d96370
3 changed files with 15 additions and 6 deletions

View File

@ -283,7 +283,7 @@ PostgreSQL documentation
</para>
<para>
The full page images are saved with the following file name format:
<literal><replaceable>LSN</replaceable>.<replaceable>RELTABLESPACE</replaceable>.<replaceable>DATOID</replaceable>.<replaceable>RELNODE</replaceable>.<replaceable>BLKNO</replaceable><replaceable>FORK</replaceable></literal>
<literal><replaceable>TIMELINE</replaceable>-<replaceable>LSN</replaceable>.<replaceable>RELTABLESPACE</replaceable>.<replaceable>DATOID</replaceable>.<replaceable>RELNODE</replaceable>.<replaceable>BLKNO</replaceable><replaceable>FORK</replaceable></literal>
The file names are composed of the following parts:
<informaltable>
@ -296,6 +296,13 @@ PostgreSQL documentation
</thead>
<tbody>
<row>
<entry>TIMELINE</entry>
<entry>The timeline of the WAL segment file where the record
is located formatted as one 8-character hexadecimal number
<literal>%08X</literal></entry>
</row>
<row>
<entry>LSN</entry>
<entry>The <acronym>LSN</acronym> of the record with this image,