From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Use streaming read API in pgstattuple. |
Date: | 2024-11-25 18:17:06 |
Message-ID: | CALdSSPjPGRXHsVhiuDdSNWKrCfJio1mKrjnoOVDmgSN-PM8pCg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
While reviewing other threads implementing stream API for various core
subsystems, I spotted that pgstattuple could also benefit from that.
So, PFA.
Notice refactoring around pgstat_hash_page and changes in pgstat_page
signature. This is needed because pgstat_hash_tuple uses
_hash_getbuf_with_strategy rather than ReadBufferExtended, which is
OK, but makes adapting the streaming API impossible. So, I changed
this place. Old codes should behave exactly the same way as new ones.
I eliminated the additional check that _hash_getbuf_with_strategy
performed, which was blkno == P_NEW. However, since the streaming API
already delivers the right buffer, I think it's okay.
This change behaves sanely on my by-hand testing.
--
Best regards,
Kirill Reshke
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Use-stream-read-interface-for-pgstattuple-routine.patch | application/octet-stream | 4.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Vallimaharajan G | 2024-11-25 18:27:07 | [Bug] Heap Use After Free in parallel_vacuum_reset_dead_items Function |
Previous Message | Andrey M. Borodin | 2024-11-25 18:14:55 | Re: UUID v7 |