Re: Assorted improvements in pg_dump - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Assorted improvements in pg_dump
Date
Msg-id 4167039.1635192154@sss.pgh.pa.us
Whole thread Raw
In response to Re: Assorted improvements in pg_dump  (Andres Freund <andres@anarazel.de>)
Responses Re: Assorted improvements in pg_dump
Re: Assorted improvements in pg_dump
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: Re: parallelizing the archiver
Next
From: Bruce Momjian
Date:
Subject: Re: XTS cipher mode for cluster file encryption