OSDN Git Service

Obtain table locks as soon as practical during pg_dump.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Jun 2011 22:19:02 +0000 (18:19 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Jun 2011 22:19:02 +0000 (18:19 -0400)
commit68d977a73797a129913179010eea088f30e370b7
tree67c4992d916840350b94bfd3542f6750a520a3f4
parent062780ec35f9db630e784b27a54440017df77531
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.
src/bin/pg_dump/common.c