pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pg_waldump: Fix bug in per-record statistics. 6+ messages / 1 participants [nested] [flat]
* pgsql: pg_waldump: Fix bug in per-record statistics. @ 2021-03-23 00:56 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2021-03-23 00:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_waldump: Fix bug in per-record statistics. pg_waldump --stats=record identifies a record by a combination of the RmgrId and the four bits of the xl_info field of the record. But XACT records use the first bit of those four bits for an optional flag variable, and the following three bits for the opcode to identify a record. So previously the same type of XACT record could have different four bits (three bits are the same but the first one bit is different), and which could cause pg_waldump --stats=record to show two lines of per-record statistics for the same XACT record. This is a bug. This commit changes pg_waldump --stats=record so that it processes only XACT record differently, i.e., filters the opcode out of xl_info and uses a combination of the RmgrId and those three bits as the identifier of a record, only for XACT record. For other records, the four bits of the xl_info field are still used. Back-patch to all supported branches. Author: Kyotaro Horiguchi Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/2020100913412132258847@highgo.ca Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e73068b0710bfd651893e1a954e3ec95e533c118 Modified Files -------------- src/bin/pg_xlogdump/pg_xlogdump.c | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: pg_waldump: Fix bug in per-record statistics. @ 2021-03-23 00:56 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2021-03-23 00:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_waldump: Fix bug in per-record statistics. pg_waldump --stats=record identifies a record by a combination of the RmgrId and the four bits of the xl_info field of the record. But XACT records use the first bit of those four bits for an optional flag variable, and the following three bits for the opcode to identify a record. So previously the same type of XACT record could have different four bits (three bits are the same but the first one bit is different), and which could cause pg_waldump --stats=record to show two lines of per-record statistics for the same XACT record. This is a bug. This commit changes pg_waldump --stats=record so that it processes only XACT record differently, i.e., filters the opcode out of xl_info and uses a combination of the RmgrId and those three bits as the identifier of a record, only for XACT record. For other records, the four bits of the xl_info field are still used. Back-patch to all supported branches. Author: Kyotaro Horiguchi Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/2020100913412132258847@highgo.ca Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5386a8506d7da3cf1af3fbdb04d7c4f811674574 Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: pg_waldump: Fix bug in per-record statistics. @ 2021-03-23 00:56 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2021-03-23 00:56 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_waldump: Fix bug in per-record statistics. pg_waldump --stats=record identifies a record by a combination of the RmgrId and the four bits of the xl_info field of the record. But XACT records use the first bit of those four bits for an optional flag variable, and the following three bits for the opcode to identify a record. So previously the same type of XACT record could have different four bits (three bits are the same but the first one bit is different), and which could cause pg_waldump --stats=record to show two lines of per-record statistics for the same XACT record. This is a bug. This commit changes pg_waldump --stats=record so that it processes only XACT record differently, i.e., filters the opcode out of xl_info and uses a combination of the RmgrId and those three bits as the identifier of a record, only for XACT record. For other records, the four bits of the xl_info field are still used. Back-patch to all supported branches. Author: Kyotaro Horiguchi Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/2020100913412132258847@highgo.ca Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4a2627c41cfe9962117df19165731e84be0879dd Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: pg_waldump: Fix bug in per-record statistics. @ 2021-03-23 00:57 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2021-03-23 00:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_waldump: Fix bug in per-record statistics. pg_waldump --stats=record identifies a record by a combination of the RmgrId and the four bits of the xl_info field of the record. But XACT records use the first bit of those four bits for an optional flag variable, and the following three bits for the opcode to identify a record. So previously the same type of XACT record could have different four bits (three bits are the same but the first one bit is different), and which could cause pg_waldump --stats=record to show two lines of per-record statistics for the same XACT record. This is a bug. This commit changes pg_waldump --stats=record so that it processes only XACT record differently, i.e., filters the opcode out of xl_info and uses a combination of the RmgrId and those three bits as the identifier of a record, only for XACT record. For other records, the four bits of the xl_info field are still used. Back-patch to all supported branches. Author: Kyotaro Horiguchi Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/2020100913412132258847@highgo.ca Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4220e06f4c0c597c77e0170b4032c3cd10fb9555 Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: pg_waldump: Fix bug in per-record statistics. @ 2021-03-23 00:57 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2021-03-23 00:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_waldump: Fix bug in per-record statistics. pg_waldump --stats=record identifies a record by a combination of the RmgrId and the four bits of the xl_info field of the record. But XACT records use the first bit of those four bits for an optional flag variable, and the following three bits for the opcode to identify a record. So previously the same type of XACT record could have different four bits (three bits are the same but the first one bit is different), and which could cause pg_waldump --stats=record to show two lines of per-record statistics for the same XACT record. This is a bug. This commit changes pg_waldump --stats=record so that it processes only XACT record differently, i.e., filters the opcode out of xl_info and uses a combination of the RmgrId and those three bits as the identifier of a record, only for XACT record. For other records, the four bits of the xl_info field are still used. Back-patch to all supported branches. Author: Kyotaro Horiguchi Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/2020100913412132258847@highgo.ca Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/34279fd4fabdedba0bc72b05dc32753e1193d599 Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: pg_waldump: Fix bug in per-record statistics. @ 2021-03-23 00:57 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2021-03-23 00:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_waldump: Fix bug in per-record statistics. pg_waldump --stats=record identifies a record by a combination of the RmgrId and the four bits of the xl_info field of the record. But XACT records use the first bit of those four bits for an optional flag variable, and the following three bits for the opcode to identify a record. So previously the same type of XACT record could have different four bits (three bits are the same but the first one bit is different), and which could cause pg_waldump --stats=record to show two lines of per-record statistics for the same XACT record. This is a bug. This commit changes pg_waldump --stats=record so that it processes only XACT record differently, i.e., filters the opcode out of xl_info and uses a combination of the RmgrId and those three bits as the identifier of a record, only for XACT record. For other records, the four bits of the xl_info field are still used. Back-patch to all supported branches. Author: Kyotaro Horiguchi Reviewed-by: Shinya Kato, Fujii Masao Discussion: https://postgr.es/m/2020100913412132258847@highgo.ca Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/51893c8463501fc9a38e39cc097773dbdfb9db82 Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 9 +++++++++ 1 file changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-03-23 00:57 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-03-23 00:56 pgsql: pg_waldump: Fix bug in per-record statistics. Fujii Masao <fujii@postgresql.org> 2021-03-23 00:56 pgsql: pg_waldump: Fix bug in per-record statistics. Fujii Masao <fujii@postgresql.org> 2021-03-23 00:56 pgsql: pg_waldump: Fix bug in per-record statistics. Fujii Masao <fujii@postgresql.org> 2021-03-23 00:57 pgsql: pg_waldump: Fix bug in per-record statistics. Fujii Masao <fujii@postgresql.org> 2021-03-23 00:57 pgsql: pg_waldump: Fix bug in per-record statistics. Fujii Masao <fujii@postgresql.org> 2021-03-23 00:57 pgsql: pg_waldump: Fix bug in per-record statistics. Fujii Masao <fujii@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox