From: pinker <pinker@onet.eu>
To: pgsql-bugs@postgresql.org
Subject: pg_dump - wrong order with inheritance
Date: Mon, 23 Nov 2015 05:27:58 -0700 (MST)
Message-ID: <1448281678687-5874794.post@n5.nabble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pinker@onet.eu
Subject: Re: pg_dump - wrong order with inheritance
In-Reply-To: <1448281678687-5874794.post@n5.nabble.com>
References: <1448281678687-5874794.post@n5.nabble.com>
* 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