pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Postpone calls of unsafe server-side functions in pg_dump.
Date: Sat, 19 Nov 2022 17:00:52 +0000
Message-ID: <E1owRD2-000tbH-1w@gemulon.postgresql.org> (raw)

Postpone calls of unsafe server-side functions in pg_dump.

Avoid calling pg_get_partkeydef(), pg_get_expr(relpartbound),
and regtypeout until we have lock on the relevant tables.
The existing coding is at serious risk of failure if there
are any concurrent DROP TABLE commands going on --- including
drops of other sessions' temp tables.

Back-patch of commit e3fcbbd62.  That's been in v15/HEAD long enough
to have some confidence about it, so now let's fix the problem in
older branches.

Original patch by me; thanks to Gilles Darold for back-patching
legwork.

Discussion: https://postgr.es/m/2273648.1634764485@sss.pgh.pa.us
Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc
Discussion: https://postgr.es/m/45c93d57-9973-248e-d2df-e02ca9af48d4@darold.net

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e46e986baef04b9127a991f8a08d5c057671cb45

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 150 +++++++++++++++++++++++++---------------------
src/bin/pg_dump/pg_dump.h |   4 +-
2 files changed, 84 insertions(+), 70 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1owRD2-000tbH-1w@gemulon.postgresql.org>
Permalink:  ../E1owRD2-000tbH-1w@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1owRD2-000tbH-1w@gemulon.postgresql.org

 · 

reply

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: Postpone calls of unsafe server-side functions in pg_dump.
  In-Reply-To: <E1owRD2-000tbH-1w@gemulon.postgresql.org>
  References: <E1owRD2-000tbH-1w@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