pg_dump - wrong order with inheritance

From: pinker <pinker(at)onet(dot)eu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_dump - wrong order with inheritance
Date: 2015-11-23 12:27:58
Message-ID: 1448281678687-5874794.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

*PostgreSQL version*: "PostgreSQL 9.4.4 on i686-pc-linux-gnu, compiled by gcc
(Debian 4.4.5-8) 4.4.5, 32-bit"*Operating system*: Debian GNU/Linux
6.0*pg_dump*: pg_dump (PostgreSQL) 9.4.4*command*:
/opt/postgresql-9.4.4/bin/pg_dump -U myuser -p 5433 $DBNAME |
/opt/postgresql-9.4.4/bin/psql -p 5433 -U myuser ${DBNAME}_${branch}pg_dump
doesn't dump data in correct order, so I'm not able to properly restore
data. I've used command above and got following errors:
136257:2015-11-23 10:46:55 CET [3107]: [5150-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: null value in
column "category_xxx" violates not-null constraint136337:2015-11-23 10:46:55
CET [3107]: [5169-1] user=myuser,db=copied_db,app=psql,client=[local] ERROR:
null value in column "xxx_id" violates not-null constraint139900:2015-11-23
10:46:59 CET [3107]: [6932-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or update on
table "xxx01" violates foreign key constraint "..."139975:2015-11-23
10:46:59 CET [3107]: [6982-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or update on
table "xxxx09" violates foreign key constraint "..."140026:2015-11-23
10:46:59 CET [3107]: [7016-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or update on
table "xxxx22" violates foreign key constraint "..."140041:2015-11-23
10:46:59 CET [3107]: [7026-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or update on
table "xxxx11" violates foreign key constraint "ooo"140046:2015-11-23
10:46:59 CET [3107]: [7030-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: constraint "ooo"
for table "xxx22" does not exist140056:2015-11-23 10:46:59 CET [3107]:
[7037-1] user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or
update on table "xxx44" violates foreign key constraint
"..."140086:2015-11-23 10:46:59 CET [3107]: [7057-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or update on
table "xxx12" violates foreign key constraint "..."140119:2015-11-23
10:46:59 CET [3107]: [7079-1]
user=myuser,db=copied_db,app=psql,client=[local] ERROR: insert or update on
table "xxx27" violates foreign key constraint "..."
Some tables are inherited. Maybe it's the issue with right order by
inheritance?Maybe I can somehow force another order?

--
View this message in context: http://postgresql.nabble.com/pg-dump-wrong-order-with-inheritance-tp5874794.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Caleb Meredith 2015-11-23 13:05:51 Re: BUG #13780: Multiple commands not allowed for creating a policy.
Previous Message Michael Paquier 2015-11-23 12:16:15 Re: BUG #13780: Multiple commands not allowed for creating a policy.