Re: create partition table caused server crashed with self-referencing foreign key

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: amul sul <sulamul(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: create partition table caused server crashed with self-referencing foreign key
Date: 2020-04-23 02:50:22
Message-ID: CAApHDvoZjPSN7wMx_Ux7xoGN_FGW3TthNtvy+BsfyAiVtLzS2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 22 Apr 2020 at 23:50, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Wed, Apr 22, 2020 at 10:21:21PM +1200, David Rowley wrote:
> > I pushed a patch to remove the Assert. I didn't really feel a need to
> > make any adjustments to the regression tests for this. The Assert was
> > clearly out of place, it's hard to imagine that this could ever get
> > broken again.
>
> Still, it seems to me that there could be a point in having a test for
> partitioned tables with FKs referencing themselves. We have such
> tests for plain tables for example.

The reason I didn't take the additional tests that were proposed by
Amul was that I didn't think that they really added any additional
coverage to the code that remained. They would only have served to
ensure that nobody went and added the same Assert back again. Since
the Assert was clearly out of place, I didn't think it was worthy of
burdening our build farm with the additional overhead of the modified
test from now until the end of time.

I'd put it akin to fixing a spelling mistake in an error message and
adding a special test specifically to ensure the spelling is correct.
Would we add a test for that? Likely not. Would someone reintroduce
the spelling mistake again? Likely not.

I think discussions for any tests beyond the scope of this fix are
probably for another thread. I'm happy to join any discussions about
it there.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-04-23 03:08:42 Re: xid wraparound danger due to INDEX_CLEANUP false
Previous Message Mark Dilger 2020-04-23 02:43:38 Re: new heapcheck contrib module