Re: Use read streams in pg_visibility
Nazir Bilal Yavuz <byavuz81@gmail.com>
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-03T19:46:34Z
Lists: pgsql-hackers
Attachments
- v5-0001-Fix-ASAN-error-introduced-in-ed1b1ee59f.patch (text/x-patch) patch v5-0001
Hi, On Tue, 3 Sept 2024 at 22:20, Noah Misch <noah@leadboat.com> wrote: > > On Tue, Sep 03, 2024 at 10:50:11AM -0700, Noah Misch wrote: > > On Mon, Sep 02, 2024 at 03:20:12PM +0300, Nazir Bilal Yavuz wrote: > > > Thanks, updated patches are attached. > > > > > +/* > > > + * Ask the callback which block it would like us to read next, with a small > > > + * buffer in front to allow read_stream_unget_block() to work and to allow the > > > + * fast path to skip this function and work directly from the array. > > > */ > > > static inline BlockNumber > > > read_stream_get_block(ReadStream *stream, void *per_buffer_data) > > > > v4-0001-Add-general-use-struct-and-callback-to-read-strea.patch introduced > > this update to the read_stream_get_block() header comment, but we're not > > changing read_stream_get_block() here. I reverted this. Sorry, it should be left from rebase. Thanks for reverting it. > > Pushed with some other cosmetic changes. Thanks! > I see I pushed something unacceptable under ASAN. I will look into that: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=grassquit&dt=2024-09-03%2017%3A47%3A20 I think it is related to the scope of BlockRangeReadStreamPrivate in the collect_visibility_data() function. Attached a small fix for that. -- Regards, Nazir Bilal Yavuz Microsoft
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