From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: During pg_dump startup, acquire table locks in batches.
Date: Tue, 03 Jan 2023 22:56:56 +0000
Message-ID: <E1pCqDI-001uNY-Cy@gemulon.postgresql.org> (raw)
During pg_dump startup, acquire table locks in batches.
Combine multiple LOCK TABLE commands to reduce the number of
round trips to the server. This is particularly helpful when
dumping from a remote server, but it seems useful even without
that. In particular, shortening the time from seeing a table
in pg_class to acquiring lock on it reduces the window for
trouble from concurrent DDL.
Aleksander Alekseev, reviewed by FabrÃzio de Royes Mello,
Gilles Darold, and Andres Freund
Discussion: https://postgr.es/m/CAJ7c6TO4z1+OBa-R+fC8FnaUgbEWJUf2Kq=nRngTW5EXtKru2g@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5f53b42cfd053a724fcbe0712a9d5716e576a3e6
Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: During pg_dump startup, acquire table locks in batches.
In-Reply-To: <E1pCqDI-001uNY-Cy@gemulon.postgresql.org>
References: <E1pCqDI-001uNY-Cy@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox