Re: Streamify more code paths - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Streamify more code paths
Date
Msg-id anHP76kHERin5G8H@paquier.xyz
Whole thread
In response to Re: Streamify more code paths  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: Streamify more code paths
List pgsql-hackers
On Tue, Aug 04, 2026 at 09:40:23AM +0300, Nazir Bilal Yavuz wrote:
> On Mon, 3 Aug 2026 at 15:25, Mihail Nikalayeu <mihailnikalayeu@gmail.com> wrote:
>> The simplest fix is to reorder a few lines of code - attached (with a
>> test generated by Claude based on my instructions).
>
> I agree with you, fix LGTM.

That seems sensible at first sight.  I am not really convinced by the
need of a test, even if useful to prove your point.

> > But probably we should think broader to avoid such issues in the future.
>
> I am not sure how we can enforce this with a code check. Perhaps we
> can add a comment to the read_stream code, but I am not sure how
> effective that would be.

Not sure about this part.  Let's fix the actual issue first.  Will
double-check and address later.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "ZizhuanLiu X-MAN"
Date:
Subject: Re: Fix var_eq_const: sum selectivity of all matching MCV entries instead of stopping at first match
Next
From: Bertrand Drouvot
Date:
Subject: Re: Streamify more code paths