| From: | Joao Rito <joaovictor(dot)rito(at)gmail(dot)com> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | shihao zhong <zhong950419(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Fix ReadStream handling when heap rescan strategy changes |
| Date: | 2026-11-14 21:34:40 |
| Message-ID: | 20261114213440.96-1-joaovictor.rito@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Bertrand,
Thank you for the patch. I tested v1 (0001 and 0002) and it looks good to
me.
What I did:
- Applied both patches to current master (165af118c5). They apply cleanly
and build without warnings (--enable-cassert --enable-debug
--enable-tap-tests).
- make check passes (243 tests). The whole src/test/modules/test_misc
suite passes with the patch (16 files, 169 tests), including the new
t/016_heap_rescan_strategy.pl.
- I also ran the new test against unpatched master. It fails there on
"a rescanned sequential scan uses its newly selected bulk-read strategy"
(got 0, expected > 0). So the test does catch the bug, which I think
helps with the question of whether it is worth its setup cost.
- I ran the query from the test by hand (shared_buffers = 1MB,
max_parallel_workers_per_gather = 0) and looked at
pg_stat_get_backend_io() for the bulkread context:
- master: 0 reads, 0 hits in bulkread, with io_method = worker and
io_method = sync.
- patched: 468 reads, 104 hits in bulkread, with both io_method values.
The query returns the same 11997 rows in both builds, and there were no
assertion failures or errors in the server log.
One small thing: the commit message of 0001 has an empty "Reviewed-by:"
and "Discussion: https://postgr.es/m/" without the message-id. I guess you
will fill those in later.
I only tested the case where the rescan starts using a strategy. I did not
exercise the other direction (the strategy is disabled on rescan, the
extension case you described), and I did not test parallel, bitmap or TID
range scans, io_uring, the back branches, or a meson build.
Thanks again,
Joao Rito
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-11-14 22:48:38 | Re: pgstat: Flush some statistics within running transactions, take 2 |
| Previous Message | Joao Rito | 2026-11-14 21:33:30 | Re: CREATE SCHEMA still resolves unqualified type names in pg_temp |