On 2018-Jun-28, Andres Freund wrote: > On 2018-06-28 22:35:11 +0530, Rajkumar Raghuwanshi wrote: > > On Thu, Jun 28, 2018 at 9:45 PM, Andres Freund <and...@anarazel.de> wrote: > > > On 2018-06-28 16:08:31 +0530, Rajkumar Raghuwanshi wrote: > > > > I am getting server crash with below test case, logfile message and core > > > > dump details in the mail.
> Alvaro, sounds like it could be an open item assigned to you? You're right. The attached patch seems to fix it. I think I should add Rajkumar's test case too, though, so I'm not pushing this evening. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>From 8743ee29a66e8ec65db9a1b44fe545088f2b95f2 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera <alvhe...@alvh.no-ip.org> Date: Thu, 28 Jun 2018 18:57:05 -0400 Subject: [PATCH] Fix crash when ALTER TABLE recreates indexes on partitions The skip_build flag was not being passed correctly when recursing to indexes on partitions, leading to attempts to rebuild indexes when they were not yet ready to be rebuilt. Reported-by: Rajkumar Raghuwanshi Discussion: https://postgr.es/m/cakcux6mxncgsgatwf5cgmf8g4wsupcxiccvmekutuwbyxho...@mail.gmail.com --- src/backend/commands/indexcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 3b82876c90..576c85f732 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -1033,7 +1033,7 @@ DefineIndex(Oid relationId, indexRelationId, /* this is our child */ createdConstraintId, is_alter_table, check_rights, check_not_in_use, - false, quiet); + skip_build, quiet); } pfree(attmap); -- 2.11.0