You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this, CREATE TABLE ip (id int PRIMARY KEY); CREATE TABLE ic (id int) INHERITS (ip); ALTER TABLE ic ALTER id DROP NOT NULL;pg_upgrade fails during the schema restore phase due to this error: ERROR: column "id" in child table must be marked NOT NULLThis can only be fixed by marking the child column as NOT NULL beforethe upgrade, which could take an arbitrary amount of time (because ic'sdata must be scanned). Have pg_upgrade's check mode warn if thatcondition is found, so that users know what to adjust before running theupgrade for real.Author: Ali Akbar <the.apaan@gmail.com>Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>Backpatch-through: 13Discussion:https://postgr.es/m/CACQjQLoMsE+1pyLe98pi0KvPG2jQQ94LWJ+PTiLgVRK4B=i_jg@mail.gmail.com