From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: pg_dump is broken for partition tablespaces
Date: Sun, 14 Apr 2019 10:16:44 -0400
Message-ID: <11955.1555251404@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKJS1f_y6jU1HJof1_sKcVtsypO+gvrtdXvuV3afqK6RsrROrw@mail.gmail.com>
References: <CAKJS1f_1c260nOt_vBJ067AZ3JXptXVRohDVMLEBmudX1YEx-A@mail.gmail.com>
<20190412233637.GA5173@alvherre.pgsql>
<CAKJS1f_y6jU1HJof1_sKcVtsypO+gvrtdXvuV3afqK6RsrROrw@mail.gmail.com>
David Rowley <david.rowley@2ndquadrant.com> writes:
> I'd say the fact that we populate reltablespace with 0 is a bug as
> it's not going to do what they want after a dump/restore.
Well, it's not really nice perhaps, but you cannot just put in some
other concrete tablespace OID instead. What a zero there means is
"use the database's default tablespace", and the point of it is that
it still means that after the DB has been cloned with a different
default tablespace. If we don't store 0 then we break
"CREATE DATABASE ... TABLESPACE = foo".
You could imagine using some special tablespace OID that has these
semantics (*not* pg_default, but some new row in pg_tablespace).
I'm not sure that that'd provide any functional improvement over
using zero, but we could certainly entertain such a change if
partitioned tables seem to need it.
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.rowley@2ndquadrant.com, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, andres@anarazel.de
Subject: Re: pg_dump is broken for partition tablespaces
In-Reply-To: <11955.1555251404@sss.pgh.pa.us>
* 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