Re: BUG #17076: Server crashes on composing an error message about invalid modulus for a new table partition

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17076: Server crashes on composing an error message about invalid modulus for a new table partition
Дата
Msg-id 485564.1624991812@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17076: Server crashes on composing an error message about invalid modulus for a new table partition  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-bugs
Amit Langote <amitlangote09@gmail.com> writes:
> On Tue, Jun 29, 2021 at 7:30 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I think the patch has got more problems than that too, as it's far
>>> from clear why the next remainder would have anything to do with the
>>> next larger modulus.

> Yes.  Though, I think the problem is that the code uses
> boundinfo->indexes[<offset>] as an index into partdesc->oids[] array
> to get the existing partition to show in the error message.  The
> correct thing here would be to use <offset> directly.  That is because
> the hash partition bounds as laid out in boudinfo->datums[] correspond
> one-to-one with the partition OIDs laid out in partdesc->oids[].

Got it.  Pushed your fix, along with some twiddling of the nearby
comments which seemed a bit vague.

            regards, tom lane



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: BUG #17076: Server crashes on composing an error message about invalid modulus for a new table partition
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: BUG #17066: Cache lookup failed when null (iso-8859-1) is passed as anycompatiblemultirange