Re: pg_dump is broken for partition tablespaces

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_dump is broken for partition tablespaces
Дата
Msg-id 20190422191322.GA30452@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pg_dump is broken for partition tablespaces  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2019-Apr-22, Tom Lane wrote:

> 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 (?).

Hmm, I don't think so, because dump uses default_tablespace on a plain
table instead of TABLESPACE clauses, and the table is attached
afterwards.

> The results after ALTER DATABASE ... SET TABLESPACE X
> are unclear too.

Currently we disallow SET TABLESPACE X if you have any table in that
tablespace, and we do that by searching for files.  A partitioned table
would not have a file that would cause it to fail, so this is something
to study.


(BTW I think these tablespace behaviors are not tested very much.  The
tests we have are intra-database operations only, and there's only a
single non-default tablespace.)

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_dump is broken for partition tablespaces
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TM format can mix encodings in to_char()