Obtain table locks as soon as practical during pg_dump.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: a95cfd085df5f146d67390344b588629e0efa8f1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-06-17T22:19:09Z
Releases: 9.1.0
Obtain table locks as soon as practical during pg_dump.

For some reason, when we (I) added table lock acquisition to pg_dump,
we didn't think about making it happen as soon as possible after the
start of the transaction.  What with subsequent additions, there was
actually quite a lot going on before we got around to that; which sort
of defeats the purpose.  Rearrange the order of calls in dumpSchema()
to close the risk window as much as we easily can.  Back-patch to all
supported branches.

Files

PathChange+/−
src/bin/pg_dump/common.c modified +11 −5