Re: [BUG] Partition creation fails after dropping a column andadding a partial index - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [BUG] Partition creation fails after dropping a column andadding a partial index
Date
Msg-id 20191102052001.GB1614@paquier.xyz
Whole thread Raw
In response to Re: [BUG] Partition creation fails after dropping a column and addinga partial index  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
On Fri, Nov 01, 2019 at 09:58:26AM +0900, Amit Langote wrote:
> On Thu, Oct 31, 2019 at 1:45 PM Michael Paquier <michael@paquier.xyz> wrote:
>> The patch is rather simple as per the attached, with extended
>> regression tests included.  I have not checked on back-branches yet,
>> but that's visibly wrong since 8b08f7d down to v11 (will do that when
>> back-patching).
>
> The patch looks correct and applies to both v12 and v11.

Thanks for the review, committed down to v11.  The version for v11 had
a couple of conflicts actually.

>> There could be a point in changing convert_tuples_by_name_map & co so
>> as they return the length of the map on top of the map to avoid such
>> mistakes in the future.  That's a more invasive patch not really
>> adapted for a back-patch, but we could do that on HEAD once this bug
>> is fixed.  I have also checked other calls of this API and the
>> handling is done correctly.
>
> I've been bitten by this logical error when deciding what length to
> use for the map, so seems like a good idea.

Okay, let's see about that then.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Remove configure --disable-float4-byval and --disable-float8-byval
Next
From: Pavel Stehule
Date:
Subject: Re: [Proposal] Global temporary tables