Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling.
От | Jeevan Ladhe |
---|---|
Тема | Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. |
Дата | |
Msg-id | CAOgcT0PPxRsHMMhB0cZY=fC=O9y69tptH5PioHx64DPc9t14zA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling.
|
Список | pgsql-hackers |
On Thu, May 11, 2017 at 4:47 PM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:
We add PARTITION OF clause for a table which is partition, so if the
parent is not present while restoring, the restore is going to fail.
+1
But, similarly for inheritance if we dump a child table, it's dump is broken as
of today. When we dump a child table we append "inherits(parenttab)" clause at
the end of the DDL. Later when we try to restore this table on a database not
having the parenttab, the restore fails.
So, I consider this as a bug.
Consider following example:
postgres=# create table tab1(a int, b int);
CREATE TABLE
postgres=# create table tab2(c int, d char) inherits(tab1);
CREATE TABLE
postgres=# \! pg_dump postgres -t tab2 > a.sql
postgres=# create database bkdb;
CREATE DATABASE
postgres=# \! psql bkdb < a.sql
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
ERROR: relation "tab1" does not exist
ERROR: relation "tab2" does not exist
ERROR: relation "tab2" does not exist
invalid command \.
postgres=#
Regards,
Jeevan Ladhe
В списке pgsql-hackers по дате отправления: