On Tue, Apr 16, 2024 at 08:11:49PM +0200, Alvaro Herrera wrote:
> This is still missing some cleanup and additional tests, of course.
> Speaking of which, I wonder if I should modify pg16's tests so that they
> leave behind tables set up in this way, to immortalize pg_upgrade
> testing.
That seems like it could be important. I considered but never actually
test your patch by pg_upgrading across major versions.
BTW, this works up to v16 (although maybe it should not):
| CREATE TABLE ip(id int PRIMARY KEY); CREATE TABLE ic(id int) INHERITS (ip); ALTER TABLE ic ALTER id DROP NOT NULL;
Under v17, this fails. Maybe that's okay, but it should probably be
called out in the release notes.
| ERROR: cannot drop inherited constraint "ic_id_not_null" of relation "ic"
That's the issue that I mentioned in the 6 year old thread. In the
future (upgrading *from* v17) it won't be possible anymore, right? It'd
still be nice to detect the issue in advance rather than failing halfway
through the upgrade. I have a rebased patch while I'll send on that
thread. I guess it's mostly unrelated to your patch but it'd be nice if
you could take a look.
--
Justin