From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: exclusion@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17076: Server crashes on composing an error message about invalid modulus for a new table partition
Date: Tue, 29 Jun 2021 14:36:52 -0400
Message-ID: <485564.1624991812@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+HiwqF+keTbzQqYPR=QtzNon+huzCRcb676eb66NTqPYDARtA@mail.gmail.com>
References: <17076-89a16ae835d329b9@postgresql.org>
<342122.1624914489@sss.pgh.pa.us>
<346711.1624919432@sss.pgh.pa.us>
<CA+HiwqF+keTbzQqYPR=QtzNon+huzCRcb676eb66NTqPYDARtA@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, amitlangote09@gmail.com, peter.eisentraut@enterprisedb.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17076: Server crashes on composing an error message about invalid modulus for a new table partition
In-Reply-To: <485564.1624991812@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox