Re: Beautify read stream "per buffer data" APIs - Mailing list pgsql-hackers

From solai v
Subject Re: Beautify read stream "per buffer data" APIs
Date
Msg-id CAF0whueLddMPDdaVOsn7rdiWBzPo7EDQmH+BJuv1gg9v9M8PJQ@mail.gmail.com
Whole thread
In response to Re: Beautify read stream "per buffer data" APIs  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Chengpeng Yan
Date:
Subject: Re: [PATCH] Fix overflow and underflow in regr_r2()
Next
From: "Joel Jacobson"
Date:
Subject: Re: Key joins