Display is_prev_bucket_same_wrt of xl_hash_squeeze_page

Started by Kirill Reshke7 months ago3 messageshackers
Jump to latest
#1Kirill Reshke
reshkekirill@gmail.com

Hi hackers!

While doing some xlog-related task at my job I noticed that pg_waldump
utility does not display `is_prev_bucket_same_wrt` of
xl_hash_squeeze_page record. I had to patch pg_waldump to fix the
issue, because I use pg_waldump output of vanilla pg to cross-check my
patches (in our closed-source pg-related project).

PFA fixing issue.

--
Best regards,
Kirill Reshke

Attachments:

v1-0001-Display-is_prev_bucket_same_wrt-of-xl_hash_squeez.patchapplication/octet-stream; name=v1-0001-Display-is_prev_bucket_same_wrt-of-xl_hash_squeez.patchDownload+3-3
#2Michael Paquier
michael@paquier.xyz
In reply to: Kirill Reshke (#1)
Re: Display is_prev_bucket_same_wrt of xl_hash_squeeze_page

On Wed, Sep 10, 2025 at 06:28:10PM +0500, Kirill Reshke wrote:

While doing some xlog-related task at my job I noticed that pg_waldump
utility does not display `is_prev_bucket_same_wrt` of
xl_hash_squeeze_page record. I had to patch pg_waldump to fix the
issue, because I use pg_waldump output of vanilla pg to cross-check my
patches (in our closed-source pg-related project).

Good idea.

We are still missing the offsets in xl_hash_vacuum_one_page, which
would lead to a longer output, with perhaps less value in in.

How about old_bucket_flag and new_bucket_flag in
xl_hash_split_allocate_page, as well as procid in
xl_hash_init_meta_page? While we are looking at this area, we may as
well close the gap in the output produced.
--
Michael

#3Kirill Reshke
reshkekirill@gmail.com
In reply to: Michael Paquier (#2)
Re: Display is_prev_bucket_same_wrt of xl_hash_squeeze_page

HI, thanks for looking into this.

On Thu, 11 Sept 2025 at 05:54, Michael Paquier <michael@paquier.xyz> wrote:

We are still missing the offsets in xl_hash_vacuum_one_page, which
would lead to a longer output, with perhaps less value in in.

Yes. I guess we might want to implement this to keep things in sync:
we display dead/redirected tuple offsets in PRUNE VACUUM SCAN output
already, so maybe just display here too, this is also vacuum.

How about old_bucket_flag and new_bucket_flag in
xl_hash_split_allocate_page, as well as procid in
xl_hash_init_meta_page? While we are looking at this area, we may as
well close the gap in the output produced.

Sure

PFA v2.

--
Best regards,
Kirill Reshke

Attachments:

v2-0001-Display-more-fields-of-xl_hash-wal-records.patchapplication/octet-stream; name=v2-0001-Display-more-fields-of-xl_hash-wal-records.patchDownload+7-6