public inbox for [email protected]help / color / mirror / Atom feed
Possible mistake in Section 63.6 - 9.6devel Documentation 5+ messages / 3 participants [nested] [flat]
* Possible mistake in Section 63.6 - 9.6devel Documentation @ 2015-07-20 21:54 Vignesh Raghunathan <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Vignesh Raghunathan @ 2015-07-20 21:54 UTC (permalink / raw) To: pgsql-docs Hello, It has been mentioned in Section 63.6 that the first two fields in PageHeaderData track the most recent WAL entry related to the page. However, I am not sure how pd_checksum is related to WAL. Could it be possible that the sentence has been carried over from previous versions of the documentations without considering the change to the second field in PageHeaderData? Thanks, Vignesh. ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Possible mistake in Section 63.6 - 9.6devel Documentation @ 2015-07-21 00:59 Michael Paquier <[email protected]> parent: Vignesh Raghunathan <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Michael Paquier @ 2015-07-21 00:59 UTC (permalink / raw) To: Vignesh Raghunathan <[email protected]>; +Cc: pgsql-docs On Tue, Jul 21, 2015 at 6:54 AM, Vignesh Raghunathan <[email protected]> wrote: > Hello, > > It has been mentioned in Section 63.6 that the first two fields in > PageHeaderData track the most recent WAL entry related to the page. However, > I am not sure how pd_checksum is related to WAL. Could it be possible that > the sentence has been carried over from previous versions of the > documentations without considering the change to the second field in > PageHeaderData? Yes, the documentation is mistaken. The two bytes of pd_tli have been switched to pd_checksum in 9.3, hence only the first field is relevant for WAL, aka pd_lsn. Looking at this portion of the docs I think that it should be updated as attached, mentioning pd_checksum as well. -- Michael -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs Attachments: [text/x-patch] 20150721_pageheader_docfix.patch (2.0K, 2-20150721_pageheader_docfix.patch) download | inline diff: diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml index e5b7b4b..073fe2b 100644 --- a/doc/src/sgml/storage.sgml +++ b/doc/src/sgml/storage.sgml @@ -758,18 +758,18 @@ data. Empty in ordinary tables.</entry> <para> The first 24 bytes of each page consists of a page header - (PageHeaderData). Its format is detailed in <xref - linkend="pageheaderdata-table">. The first two fields track the most - recent WAL entry related to this page. Next is a 2-byte field - containing flag bits. This is followed by three 2-byte integer fields - (<structfield>pd_lower</structfield>, <structfield>pd_upper</structfield>, - and <structfield>pd_special</structfield>). These contain byte offsets - from the page start to the start - of unallocated space, to the end of unallocated space, and to the start of - the special space. - The next 2 bytes of the page header, - <structfield>pd_pagesize_version</structfield>, store both the page size - and a version indicator. Beginning with + (<structname>PageHeaderData</>). Its format is detailed in <xref + linkend="pageheaderdata-table">. The first field tracks the most + recent WAL entry related to this page. The second field contains + the page checksum if <xref linkend="app-initdb-data-checksums"> are + enabled. Next is a 2-byte field containing flag bits. This is followed + by three 2-byte integer fields (<structfield>pd_lower</structfield>, + <structfield>pd_upper</structfield>, and + <structfield>pd_special</structfield>). These contain byte offsets + from the page start to the start of unallocated space, to the end of + unallocated space, and to the start of the special space. The next 2 + bytes of the page header, <structfield>pd_pagesize_version</structfield>, + store both the page size and a version indicator. Beginning with <productname>PostgreSQL</productname> 8.3 the version number is 4; <productname>PostgreSQL</productname> 8.1 and 8.2 used version number 3; <productname>PostgreSQL</productname> 8.0 used version number 2; ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Possible mistake in Section 63.6 - 9.6devel Documentation @ 2015-09-09 15:42 Fujii Masao <[email protected]> parent: Michael Paquier <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Fujii Masao @ 2015-09-09 15:42 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: Vignesh Raghunathan <[email protected]>; pgsql-docs On Tue, Jul 21, 2015 at 9:59 AM, Michael Paquier <[email protected]> wrote: > On Tue, Jul 21, 2015 at 6:54 AM, Vignesh Raghunathan > <[email protected]> wrote: >> Hello, >> >> It has been mentioned in Section 63.6 that the first two fields in >> PageHeaderData track the most recent WAL entry related to the page. However, >> I am not sure how pd_checksum is related to WAL. Could it be possible that >> the sentence has been carried over from previous versions of the >> documentations without considering the change to the second field in >> PageHeaderData? > > Yes, the documentation is mistaken. The two bytes of pd_tli have been > switched to pd_checksum in 9.3, hence only the first field is relevant > for WAL, aka pd_lsn. Looking at this portion of the docs I think that > it should be updated as attached, mentioning pd_checksum as well. Also the type of pd_lsn in the Table 63-3 should be PageXLogRecPtr. Regards, -- Fujii Masao -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Possible mistake in Section 63.6 - 9.6devel Documentation @ 2015-09-10 06:05 Michael Paquier <[email protected]> parent: Fujii Masao <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Michael Paquier @ 2015-09-10 06:05 UTC (permalink / raw) To: Fujii Masao <[email protected]>; +Cc: Vignesh Raghunathan <[email protected]>; pgsql-docs On Thu, Sep 10, 2015 at 12:42 AM, Fujii Masao <[email protected]> wrote: > On Tue, Jul 21, 2015 at 9:59 AM, Michael Paquier > <[email protected]> wrote: >> On Tue, Jul 21, 2015 at 6:54 AM, Vignesh Raghunathan >> <[email protected]> wrote: >>> Hello, >>> >>> It has been mentioned in Section 63.6 that the first two fields in >>> PageHeaderData track the most recent WAL entry related to the page. However, >>> I am not sure how pd_checksum is related to WAL. Could it be possible that >>> the sentence has been carried over from previous versions of the >>> documentations without considering the change to the second field in >>> PageHeaderData? >> >> Yes, the documentation is mistaken. The two bytes of pd_tli have been >> switched to pd_checksum in 9.3, hence only the first field is relevant >> for WAL, aka pd_lsn. Looking at this portion of the docs I think that >> it should be updated as attached, mentioning pd_checksum as well. > > Also the type of pd_lsn in the Table 63-3 should be PageXLogRecPtr. Yep. See attached FWIW. -- Michael -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs Attachments: [text/x-diff] 20150910_pageheader_docfix_v2.patch (2.3K, 2-20150910_pageheader_docfix_v2.patch) download | inline diff: diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml index e5b7b4b..0153b08 100644 --- a/doc/src/sgml/storage.sgml +++ b/doc/src/sgml/storage.sgml @@ -758,18 +758,18 @@ data. Empty in ordinary tables.</entry> <para> The first 24 bytes of each page consists of a page header - (PageHeaderData). Its format is detailed in <xref - linkend="pageheaderdata-table">. The first two fields track the most - recent WAL entry related to this page. Next is a 2-byte field - containing flag bits. This is followed by three 2-byte integer fields - (<structfield>pd_lower</structfield>, <structfield>pd_upper</structfield>, - and <structfield>pd_special</structfield>). These contain byte offsets - from the page start to the start - of unallocated space, to the end of unallocated space, and to the start of - the special space. - The next 2 bytes of the page header, - <structfield>pd_pagesize_version</structfield>, store both the page size - and a version indicator. Beginning with + (<structname>PageHeaderData</>). Its format is detailed in <xref + linkend="pageheaderdata-table">. The first field tracks the most + recent WAL entry related to this page. The second field contains + the page checksum if <xref linkend="app-initdb-data-checksums"> are + enabled. Next is a 2-byte field containing flag bits. This is followed + by three 2-byte integer fields (<structfield>pd_lower</structfield>, + <structfield>pd_upper</structfield>, and + <structfield>pd_special</structfield>). These contain byte offsets + from the page start to the start of unallocated space, to the end of + unallocated space, and to the start of the special space. The next 2 + bytes of the page header, <structfield>pd_pagesize_version</structfield>, + store both the page size and a version indicator. Beginning with <productname>PostgreSQL</productname> 8.3 the version number is 4; <productname>PostgreSQL</productname> 8.1 and 8.2 used version number 3; <productname>PostgreSQL</productname> 8.0 used version number 2; @@ -799,7 +799,7 @@ data. Empty in ordinary tables.</entry> <tbody> <row> <entry>pd_lsn</entry> - <entry>XLogRecPtr</entry> + <entry>PageXLogRecPtr</entry> <entry>8 bytes</entry> <entry>LSN: next byte after last byte of xlog record for last change to this page</entry> ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Possible mistake in Section 63.6 - 9.6devel Documentation @ 2015-09-11 04:04 Fujii Masao <[email protected]> parent: Michael Paquier <[email protected]> 0 siblings, 0 replies; 5+ messages in thread From: Fujii Masao @ 2015-09-11 04:04 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: Vignesh Raghunathan <[email protected]>; pgsql-docs On Thu, Sep 10, 2015 at 3:05 PM, Michael Paquier <[email protected]> wrote: > On Thu, Sep 10, 2015 at 12:42 AM, Fujii Masao <[email protected]> wrote: >> On Tue, Jul 21, 2015 at 9:59 AM, Michael Paquier >> <[email protected]> wrote: >>> On Tue, Jul 21, 2015 at 6:54 AM, Vignesh Raghunathan >>> <[email protected]> wrote: >>>> Hello, >>>> >>>> It has been mentioned in Section 63.6 that the first two fields in >>>> PageHeaderData track the most recent WAL entry related to the page. However, >>>> I am not sure how pd_checksum is related to WAL. Could it be possible that >>>> the sentence has been carried over from previous versions of the >>>> documentations without considering the change to the second field in >>>> PageHeaderData? >>> >>> Yes, the documentation is mistaken. The two bytes of pd_tli have been >>> switched to pd_checksum in 9.3, hence only the first field is relevant >>> for WAL, aka pd_lsn. Looking at this portion of the docs I think that >>> it should be updated as attached, mentioning pd_checksum as well. >> >> Also the type of pd_lsn in the Table 63-3 should be PageXLogRecPtr. > > Yep. See attached FWIW. Thanks! Applied. Regards, -- Fujii Masao -- Sent via pgsql-docs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2015-09-11 04:04 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-07-20 21:54 Possible mistake in Section 63.6 - 9.6devel Documentation Vignesh Raghunathan <[email protected]> 2015-07-21 00:59 ` Michael Paquier <[email protected]> 2015-09-09 15:42 ` Fujii Masao <[email protected]> 2015-09-10 06:05 ` Michael Paquier <[email protected]> 2015-09-11 04:04 ` Fujii Masao <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox