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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: create partition table caused server crashed withself-referencing foreign key
Дата
Msg-id CAApHDvrUVddxuYZF0KjgtBsB_9Fs5SaaLHf4h0Rf_7q-Nqq=Jw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: create partition table caused server crashed withself-referencing foreign key  (amul sul <sulamul@gmail.com>)
Ответы Re: create partition table caused server crashed withself-referencing foreign key  (amul sul <sulamul@gmail.com>)
Список pgsql-hackers
On Wed, 22 Apr 2020 at 20:11, amul sul <sulamul@gmail.com> wrote:
>
> On Wed, Apr 22, 2020 at 1:21 PM Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com> wrote:
>> #2  0x0000000000acd16a in ExceptionalCondition (conditionName=0xc32310 "numfks == attmap->maplen",
errorType=0xc2ea23"FailedAssertion", fileName=0xc2f0bf "tablecmds.c", lineNumber=9046) at assert.c:67
 
>
>
> Looks like this assertion is incorrect, I guess it should have check
> numfks <= attmap->maplen instead.

Even that seems like a very strange thing to Assert. Basically it's
saying, make sure the number of columns in the foreign key constraint
is less than or equal to the number of attributes in parentRel.

It's true we do disallow duplicate column names in the foreign key
constraint (at least since 9da867537), but why do we want an Assert to
say that?  I don't see anything about that code that would break if we
did happen to allow duplicate columns in the foreign key.  I'd say the
Assert should just be removed completely.

David



В списке pgsql-hackers по дате отправления:

Предыдущее
От: amul sul
Дата:
Сообщение: Re: create partition table caused server crashed withself-referencing foreign key
Следующее
От: 曾文旌
Дата:
Сообщение: Re: [Proposal] Global temporary tables