First WAL segment file that initdb creates

Started by Fujii Masaoabout 7 years ago3 messageshackersdocs
Jump to latest
#1Fujii Masao
masao.fujii@gmail.com
hackersdocs

Hi,

There is the following description in wal.sgml.

Segment
files are given ever-increasing numbers as names, starting at
<filename>000000010000000000000000</filename>.

But the first WAL segment file that initdb creates is 000000010000000000000001
not 000000010000000000000000. This change was caused by old commit 8c843fff2d,
but seems the documentation had not been updated unfortunately a long time.
Attached patch replaces 000000010000000000000000 with 000000010000000000000001
in the above description.

This patch needs to be back-patched to all the supported versions.

Regards,

--
Fujii Masao

Attachments:

first_wal_segment_v1.patchapplication/octet-stream; name=first_wal_segment_v1.patchDownload+2-2
#2David Zhang
david.zhang@highgo.ca
In reply to: Fujii Masao (#1)
hackersdocs
Re: First WAL segment file that initdb creates

The following review has been posted through the commitfest application:
make installcheck-world: not tested
Implements feature: not tested
Spec compliant: not tested
Documentation: tested, passed

The issue has been verified using below steps:
1. $ initdb -D /home/test/PG122DATA/data
2. $ ls -l /home/test/PG122DATA/data/pg_wal/
total 16388
-rw------- 1 test test 16777216 Feb 18 12:07 000000010000000000000001
drwx------ 2 test test 4096 Feb 18 12:07 archive_status

The first WAL segment file created by initdb is "000000010000000000000001", not "000000010000000000000000".

#3Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: David Zhang (#2)
hackersdocs
Re: First WAL segment file that initdb creates

On 2020/02/19 5:26, David Zhang wrote:

The following review has been posted through the commitfest application:
make installcheck-world: not tested
Implements feature: not tested
Spec compliant: not tested
Documentation: tested, passed

The issue has been verified using below steps:
1. $ initdb -D /home/test/PG122DATA/data
2. $ ls -l /home/test/PG122DATA/data/pg_wal/
total 16388
-rw------- 1 test test 16777216 Feb 18 12:07 000000010000000000000001
drwx------ 2 test test 4096 Feb 18 12:07 archive_status

The first WAL segment file created by initdb is "000000010000000000000001", not "000000010000000000000000".

Thanks for the test! I pushed the patch.

Regards,

--
Fujii Masao
NTT DATA CORPORATION
Advanced Platform Technology Group
Research and Development Headquarters