Re: Problems with pg_upgrade after change of unix user running db. - Mailing list pgsql-general

From Tom Lane
Subject Re: Problems with pg_upgrade after change of unix user running db.
Date
Msg-id 29417.1475506441@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problems with pg_upgrade after change of unix user running db.  (Benedikt Grundmann <bgrundmann@janestreet.com>)
Responses Re: Problems with pg_upgrade after change of unix user running db.  (Benedikt Grundmann <bgrundmann@janestreet.com>)
List pgsql-general
Benedikt Grundmann <bgrundmann@janestreet.com> writes:
> And it looks like now I'm back to the error that stopped me last time:
> pg_restore: [archiver (db)] Error from TOC entry 8425; 2606 416548282 CHECK
> CONSTRAINT seqno_not_null postgres_prod
> pg_restore: [archiver (db)] could not execute query: ERROR:  constraint
> "seqno_not_null" for relation "js_activity_20110101" already exists
>    Command was: ALTER TABLE "js_activity_20110101"
>    ADD CONSTRAINT "seqno_not_null" CHECK (("seqno" IS NOT NULL)) NOT VALID;

Hm.  I'm guessing that table is a child table, and this has something to
do with improper constraint inheritance.  Could we see psql \d+ output
for both this table and its parent?  And for good measure, maybe the
output of

SELECT conname,convalidated,conislocal,coninhcount,connoinherit
FROM pg_constraint WHERE conrelid = 'js_activity_20110101'::regclass;

and likewise for the parent table.

            regards, tom lane


pgsql-general by date:

Previous
From: Benedikt Grundmann
Date:
Subject: Re: Problems with pg_upgrade after change of unix user running db.
Next
From: Benedikt Grundmann
Date:
Subject: Re: Problems with pg_upgrade after change of unix user running db.