Re: pgsql: Fix restore of not-null constraints with inheritance

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Date: 2024-04-18T14:08:58Z
Lists: pgsql-hackers
On 2024-Apr-18, Alvaro Herrera wrote:

> Lastly, make two changes to pg_dump: 1) do not try to drop a not-null
> constraint that's marked as inherited; this allows a dump to restore
> with no errors if a table with a PK inherits from another which also has
> a PK; 2) avoid giving inherited constraints throwaway names, for the
> rare cases where such a constraint survives after the restore.

Hmm, this last bit broke pg_upgrade on crake.  I'll revert this part,
meanwhile I'll be installing 9.2 to see if it can be fixed in a better way.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



Commits

  1. Skip invalid database pg_upgrade test on obsolete servers

  2. Fix restore of not-null constraints with inheritance