Skip to content

[#1802] walinfo: Show the record type for Heap2, Standby INVALIDATIONS and Storage records - #1803

Open
rythmlongia wants to merge 1 commit into
pgmoneta:mainfrom
rythmlongia:walinfo-record-names
Open

rythmlongia wants to merge 1 commit into
pgmoneta:mainfrom
rythmlongia:walinfo-record-names

Conversation

@rythmlongia

Copy link
Copy Markdown
Contributor

Fixes #1802.

enhance_description() only named records for Heap, Btree, Transaction, XLOG and some Standby records. This adds the record type for:

  • Heap2: REWRITE, VISIBLE, MULTI_INSERT / MULTI_INSERT+INIT, LOCK_UPDATED, NEW_CID, and the prune/vacuum/freeze records (PRUNE/VACUUM/FREEZE_PAGE before PostgreSQL 17, PRUNE_ON_ACCESS/PRUNE_VACUUM_SCAN/PRUNE_VACUUM_CLEANUP from 17, since they share opcodes).
  • Standby: INVALIDATIONS.
  • Storage: CREATE, TRUNCATE.

Tested on a PostgreSQL 16 WAL segment (3839 records), counting each name in pg_waldump and pgmoneta-walinfo output:

Record pg_waldump walinfo before walinfo after
VISIBLE 1254 0 1254
MULTI_INSERT+INIT 1251 0 1251
MULTI_INSERT 83 0 83
INVALIDATIONS 3 0 3
CREATE 3 0 3
TRUNCATE 1 0 1

The number of output lines is unchanged (3840).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

walinfo: record type is missing for Heap2, Standby INVALIDATIONS and Storage records

1 participant