pgsql: Obtain table locks as soon as practical during pg_dump. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Obtain table locks as soon as practical during pg_dump.
Date
Msg-id E1QXhOO-0005JF-BK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL8_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6c320b8ab84584e8f21cf8341121a47b51e4d297

Modified Files
--------------
src/bin/pg_dump/common.c |   14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Obtain table locks as soon as practical during pg_dump.
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Set FLEXIBLE_ARRAY_MEMBER to empty for MSVC.