Sergey Shinderuk <s.shinde...@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