Re: gcc -Wclobbered in PostgresMain - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gcc -Wclobbered in PostgresMain
Date
Msg-id 2231130.1689005839@sss.pgh.pa.us
Whole thread Raw
In response to Re: gcc -Wclobbered in PostgresMain  (Sergey Shinderuk <s.shinderuk@postgrespro.ru>)
List pgsql-hackers
Sergey Shinderuk <s.shinderuk@postgrespro.ru> writes:
> On 08.07.2023 18:11, Tom Lane wrote:
>> Having done that, it wouldn't really be necessary to mark these
>> as volatile.  I kept that marking anyway for consistency with
>> send_ready_for_query, but perhaps we shouldn't?

> I don't know. Maybe marking them volatile is more future proof. Not sure.

Yeah, after sleeping on it, it seems best to have a policy that all
variables declared in that place are volatile.  Even if there's no bug
now, not having volatile creates a risk of surprising behavior after
future changes.  Pushed that way.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Performance degradation on concurrent COPY into a single relation in PG16.
Next
From: Matthias van de Meent
Date:
Subject: Re: PATCH: Using BRIN indexes for sorted output