Re: Use read streams in pg_visibility
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-10T22:38:38Z
Lists: pgsql-hackers
On Tue, Sep 10, 2024 at 02:35:46PM +0300, Nazir Bilal Yavuz wrote: > Your patch is correct. I wrongly assumed it would catch blockno bug, > the attached version catches it. I made blockno = 0 invisible and not > frozen before copying the vm file. So, in the blockno buggy version; > callback will skip that block but the main loop in the > collect_corrupt_items() will not skip it. I tested it with your patch > and there is exactly 1 blockno difference between expected and result > output. Pushed. I added autovacuum=off so auto-analyze of a system catalog can't take a snapshot that blocks VACUUM updating the vismap. I doubt that could happen under default settings, but this lets us disregard the possibility entirely. I also fixed the mix of tabs and spaces inside test file string literals.
Commits
-
Optimize pg_visibility with read streams.
- 65c310b310a6 18.0 landed
- ed1b1ee59fb3 18.0 landed
-
Revert "Optimize pg_visibility with read streams."
- ddfc556a6444 18.0 landed
-
Fix stack variable scope from previous commit.
- 1c61fd8b5279 18.0 landed
-
Add block_range_read_stream_cb(), to deduplicate code.
- c582b75851c2 18.0 landed