pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_dump is broken for partition tablespaces
Date: Mon, 22 Apr 2019 14:16:28 -0400
Message-ID: <20190422181628.GA29329@alvherre.pgsql> (raw)
In-Reply-To: <CA+Tgmoa9NsQxwKcqpq-UwYfJ3nYKWFs+p+GYBhq-F_phmUv_VA@mail.gmail.com>

On 2019-Apr-22, Robert Haas wrote:

> PostgreSQL has historically and very deliberately *not made a
> distinction* between "this object is in the default tablespace" and
> "this object is in tablespace X which happens to be the default."  I
> think that it's too late to invent such a distinction for reasons of
> backward compatibility -- and if we were going to do it, surely it
> would need to exist for both partitioned tables and the partitions
> themselves. Otherwise it just produces more strange inconsistencies.

Yeah, this is probably right.  (I don't think it's the same thing that
Tom was saying, though, or at least I didn't understand his argument
this way.)

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.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (57+ messages)  latest in thread

Message-ID: <20190422181628.GA29329@alvherre.pgsql>
Permalink:  ../20190422181628.GA29329@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190422181628.GA29329@alvherre.pgsql

 · 

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-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, david.rowley@2ndquadrant.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_dump is broken for partition tablespaces
  In-Reply-To: <20190422181628.GA29329@alvherre.pgsql>

* 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