On 2017/12/13 15:59, Ali Akbar wrote: > > Thanks for the link to those thread. > > Judging from the discussion there, it will be a long way to prevent DROP > NOT NULL.
Yeah, I remembered that discussion when writing my email, but was for some reason convinced that everything's fine even without the elaborate book-keeping of inheritance information for NOT NULL constraints. Thanks Michael for reminding.
Patch for adding check in pg_upgrade. Going through git history, the check for inconsistency in NOT NULL constraint has ben there since a long time ago. In this patch the check will be applied for all old cluster version. I'm not sure in which version was the release of table inheritance.