Re: Beautify read stream "per buffer data" APIs
solai v <solai.cdac@gmail.com>
From: solai v <solai.cdac@gmail.com>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Thomas Munro <thomas.munro@gmail.com>
Date: 2026-05-29T04:36:30Z
Lists: pgsql-hackers
Hi, I tested both patches on the current master. The patches applied cleanly, and I reviewed the API changes in read_stream.h along with the updated call sites, especially in vacuumlazy. c. The helper APIs make the code easier to read and reduce the direct void handling and manual casts in callers. I also tried reproducing the issue mentioned by Nazir about read_stream_put_value() not accepting literal constants/rvalues. Replacing: read_stream_put_value(stream, per_buffer_data, temp); with: read_stream_put_value(stream, per_buffer_data, false); still results in the following compilation error: error: lvalue required as unary '&' operand So the limitation discussed in the thread is still reproducible from my testing. Other than that, the cleanup and API refactoring look good to me overall. Regards, Solai