pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Correctly handle owned sequences with extensions
Date: Sun, 31 Jul 2016 14:57:20 +0000
Message-ID: <E1bTsB6-0001Fc-F9@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Correctly handle owned sequences with extensions

With the refactoring of pg_dump to handle components, getOwnedSeqs needs
to be a bit more intelligent regarding which components to dump when.
Specifically, we can't simply use the owning table's components as the
set of components to dump as the table might only be including certain
components while all components of the sequence should be dumped, for
example, when the table is a member of an extension while the sequence
is not.

Handle this by combining the set of components to be dumped for the
sequence explicitly and those to be dumped for the table when setting
the components to be dumped for the sequence.

Also add a number of regression tests around this to, hopefully, catch
any future changes which break the expected behavior.

Discovered by: Philippe BEAUDOIN
Reviewed by: Michael Paquier

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f9e439b1ca81e3305b677d93c67299549625370c

Modified Files
--------------
src/bin/pg_dump/pg_dump.c                          | 27 ++++++--
src/bin/pg_dump/t/002_pg_dump.pl                   | 50 +++++++++++++
src/test/modules/test_pg_dump/t/001_base.pl        | 81 +++++++++++++++++++++-
.../modules/test_pg_dump/test_pg_dump--1.0.sql     |  6 +-
4 files changed, 155 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1bTsB6-0001Fc-F9@gemulon.postgresql.org>
Permalink:  ../E1bTsB6-0001Fc-F9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1bTsB6-0001Fc-F9@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: sfrost@snowman.net
  Subject: Re: pgsql: Correctly handle owned sequences with extensions
  In-Reply-To: <E1bTsB6-0001Fc-F9@gemulon.postgresql.org>
  References: <E1bTsB6-0001Fc-F9@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