pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: soumitra bhandary <soumitra.bhandary@hotmail.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Pg_restore failing due to data inconsistency in dump file
Date: Thu, 13 Dec 2018 11:20:18 +0000
Message-ID: <MA1PR0101MB16876D291572530CED5E798DE0A00@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM> (raw)

Hello Team ,

I have encountered following issue while restoring the Postgres dump using pg_restore . Please provide any suggestion to the same .

  1.  This dump was taken using bdr_dump as bdr enabled database and all the BDR configuration and extension was excluded .
  2.  DUMP was taken in a running DB server where BDR was running .
  3.  Postgres Dump was taken in .dump format .
  4.  During restoration of the same using pg_restore getting following error .

Error :

pg_restore: [archiver (db)] Error from TOC entry 3061; 2606 17551 FK CONSTRAINT fk_5hrm2vlf9ql5fu043kqepovbr DBNAME
pg_restore: [archiver (db)] could not execute query: ERROR: insert or update on table "user_attribute" violates foreign key constraint "fk_5hrm2vlf9ql5fu043kqepovbr"
DETAIL: Key (user_id)=(1f34ec07-7087-45ff-8a56-f36177752499) is not present in table "user_entity".
Command was: ALTER TABLE ONLY user_attribute
ADD CONSTRAINT fk_5hrm2vlf9ql5fu043kqepovbr FOREIGN KEY (user_id) REFERENCES user_entity...
pg_restore: [archiver (db)] Error from TOC entry 3065; 2606 17601 FK CONSTRAINT fk_c4fqv34p1mbylloxang7b1q3l DBNAME
pg_restore: [archiver (db)] could not execute query: ERROR: insert or update on table "user_role_mapping" violates foreign key constraint "fk_c4fqv34p1mbylloxang7b1q3l"
DETAIL: Key (user_id)=(24d1ee2a-b05e-4c30-a292-84045c47611e) is not present in table "user_entity".


Thanks ,

Soumitra

view thread (7+ messages)  latest in thread

Message-ID: <MA1PR0101MB16876D291572530CED5E798DE0A00@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM>
Permalink:  ../MA1PR0101MB16876D291572530CED5E798DE0A00@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/MA1PR0101MB16876D291572530CED5E798DE0A00@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM

 · 

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 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-admin@postgresql.org
  Cc: soumitra.bhandary@hotmail.com
  Subject: Re: Pg_restore failing due to data inconsistency in dump file
  In-Reply-To: <MA1PR0101MB16876D291572530CED5E798DE0A00@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.COM>
  References: <MA1PR0101MB16876D291572530CED5E798DE0A00@MA1PR0101MB1687.INDPRD01.PROD.OUTLOOK.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