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: Fix pg_dumpall with in-place tablespaces
Date: Tue, 08 Aug 2023 23:57:09 +0000
Message-ID: <E1qTWZY-00173o-5F@gemulon.postgresql.org> (raw)

Fix pg_dumpall with in-place tablespaces

In-place tablespaces would be dumped with the path produced by
pg_tablespace_location(), which is in this case a relative path built as
pg_tblspc/OID, but this would fail to restore as such tablespaces need
to use an empty string as location.  In order to detect if an in-place
tablespace is used, this commit checks if the path returned is relative
and adapts the dump contents in consequence.

Like the other changes related to in-place tablespaces, no backpatch is
done as these are only intended for development purposes.  Rui Zhao has
fixed the code, while the test is from me.

Author: Rui Zhao, Michael Paquier
Discussion: https://postgr.es/m/80c80b4a-b87b-456f-bd46-1ae326601d79.xiyuan.zr@alibaba-inc.com

Branch
------
master

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

Modified Files
--------------
src/bin/pg_dump/pg_dumpall.c     | 11 ++++++++++-
src/bin/pg_dump/t/002_pg_dump.pl | 16 ++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)



Message-ID: <E1qTWZY-00173o-5F@gemulon.postgresql.org>
Permalink:  ../E1qTWZY-00173o-5F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qTWZY-00173o-5F@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix pg_dumpall with in-place tablespaces
  In-Reply-To: <E1qTWZY-00173o-5F@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