From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_dump is broken for partition tablespaces
Date: Mon, 22 Apr 2019 14:30:36 -0400
Message-ID: <21097.1555957836@sss.pgh.pa.us> (raw)
In-Reply-To: <20190422182050.a73zl4wkfwx2ujou@alap3.anarazel.de>
References: <CA+Tgmoa9NsQxwKcqpq-UwYfJ3nYKWFs+p+GYBhq-F_phmUv_VA@mail.gmail.com>
<20190422181628.GA29329@alvherre.pgsql>
<20190422182050.a73zl4wkfwx2ujou@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2019-04-22 14:16:28 -0400, Alvaro Herrera wrote:
>> I think we can get out of this whole class of problems by forbidding the
>> TABLESPACE clause for partitioned rels from mentioning the database
>> tablespace -- that is, users either mention some *other* tablespace, or
>> partitions follow default_tablespace like everybody else. AFAICS with
>> that restriction this whole problem does not arise, and the patch may
>> become simpler. I'll give it a spin.
> Why is the obvious answer is to not just remove the whole tablespace
> inheritance behaviour? It's obviously ambiguous and hard to get right.
> I still don't see any usecase that even comes close to making the
> inheritance useful enough to justify the amount of work (code, tests,
> bugfixes) and docs that are required.
Yeah, that's where I'm at as well. Alvaro's proposal could be made
to work perhaps, but I think it would still end up with some odd
corner-case behaviors. One example is that "TABLESPACE X" would
be allowed if the database's default tablespace is Y, but if you
try to dump and restore into a database whose default is X, it'd be
rejected (?). The results after ALTER DATABASE ... SET TABLESPACE X
are unclear too.
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, andres@anarazel.de, alvherre@2ndquadrant.com, robertmhaas@gmail.com, david.rowley@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_dump is broken for partition tablespaces
In-Reply-To: <21097.1555957836@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