Re: [BUG] Partition creation fails after dropping a column and adding a partial index
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Wyatt Alt <wyatt.alt@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-11-02T05:20:01Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix failure when creating cloned indexes for a partition
- f10815c5bf1b 11.6 landed
- 7963c4c4b782 12.1 landed
- dc816e581591 13.0 landed
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