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