Andres Freund <andres@anarazel.de> writes:
> On 2021-10-24 17:10:55 -0400, Tom Lane wrote:
>> + static bool query_prepared = false;
> I wonder if it'd be better to store this in Archive or such. The approach with
> static variables might run into problems with parallel pg_dump at some
> point. These objects aren't dumped in parallel yet, but still...
Yeah, I wasn't too happy with the static bools either. However, each
function would need its own field in the struct, which seems like a
maintenance annoyance, plus a big hazard for future copy-and-paste
changes (ie, copy and paste the wrong flag name -> trouble). Also
the Archive struct is shared between dump and restore cases, so
adding a dozen fields that are irrelevant for restore didn't feel
right. So I'd like a better idea, but I'm not sure that that one
is better.
regards, tom lane