forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4220e06
committed
pg_waldump: Fix bug in per-record statistics.
pg_waldump --stats=record identifies a record by a combinationof 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 optionalflag variable, and the following three bits for the opcode toidentify a record. So previously the same type of XACT recordcould have different four bits (three bits are the same but thefirst one bit is different), and which could causepg_waldump --stats=record to show two lines of per-record statisticsfor the same XACT record. This is a bug.This commit changes pg_waldump --stats=record so that it processesonly XACT record differently, i.e., filters the opcode out of xl_infoand uses a combination of the RmgrId and those three bits asthe 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 HoriguchiReviewed-by: Shinya Kato, Fujii MasaoDiscussion:https://postgr.es/m/2020100913412132258847@highgo.ca1 parentc0849e4 commit4220e06
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
512 | 521 | | |
513 | 522 | | |
514 | 523 | | |
| |||
0 commit comments
Comments
(0)