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: v1-0001-Use-stream-read-interface-for-pgstattuple-routine.patch
Description: Binary data

Reply via email to