pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve failure detection with array parsing in pg_dump
Date: Thu, 19 Nov 2020 01:36:28 +0000
Message-ID: <E1kfYs8-000898-Oc@gemulon.postgresql.org> (raw)

Improve failure detection with array parsing in pg_dump

Similarly to 3636efa, the checks done in pg_dump when parsing array
values from catalogs have been too lax.  Under memory pressure, it could
be possible, though very unlikely, to finish with dumps that miss some
data like:
- Statistics for indexes
- Run-time configuration of functions
- Configuration of extensions
- Publication list for a subscription

No backpatch is done as this is not going to be a problem in practice.
For example, if an OOM causes an array parsing to fail, a follow-up code
path of pg_dump would most likely complain with an allocation failure
due to the memory pressure.

Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20201111061319.GE2276@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/13b58f8934e6252868231c3493d49b8c2b363e5d

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 51 +++++++++++++++++++++++++----------------------
1 file changed, 27 insertions(+), 24 deletions(-)



Message-ID: <E1kfYs8-000898-Oc@gemulon.postgresql.org>
Permalink:  ../E1kfYs8-000898-Oc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kfYs8-000898-Oc@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: michael@paquier.xyz
  Subject: Re: pgsql: Improve failure detection with array parsing in pg_dump
  In-Reply-To: <E1kfYs8-000898-Oc@gemulon.postgresql.org>
  References: <E1kfYs8-000898-Oc@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