From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Benedikt Grundmann <bgrundmann(at)janestreet(dot)com> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problems with pg_upgrade after change of unix user running db. |
Date: | 2016-10-03 20:01:03 |
Message-ID: | 11978.1475524863@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Benedikt Grundmann <bgrundmann(at)janestreet(dot)com> writes:
> proddb_testing=# SELECT
> conname,convalidated,conislocal,coninhcount,connoinherit
> proddb_testing-# FROM pg_constraint WHERE conrelid =
> 'js_activity_20110101'::regclass;
> conname | convalidated | conislocal |
> coninhcount | connoinherit
> ---------------------------------------------+--------------+------------+-------------+--------------
> seqno_not_null | f | t |
> 1 | f
After some tracing through the code, I think it's the combination of all
three of coninhcount>0, conislocal, and !convalidated that is producing
the problem, and even then possibly only in binary-upgrade mode. pg_dump
is jumping through some hoops to try to restore that state, and evidently
not getting it entirely right.
Is there a reason you've left all these constraints in NOT VALID state?
They're kinda useless that way. Probably if you updated them to be valid
(see ALTER TABLE ... VALIDATE CONSTRAINT), the upgrade would go through
without difficulty.
I'll look into fixing this, but depending on how messy it turns out to be,
it might be something we choose to fix only in HEAD.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Tanzer | 2016-10-03 20:05:12 | Re: isnull() function in pgAdmin3 |
Previous Message | Tom Lane | 2016-10-03 19:46:20 | Re: Understanding “max_wal_size” and “min_wal_size” parameters default values from postgresql.conf file |