Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k1w3f-0001nX-W6 for pgsql-committers@arkaria.postgresql.org; Sat, 01 Aug 2020 18:16:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k1w3e-0000lb-Ub for pgsql-committers@arkaria.postgresql.org; Sat, 01 Aug 2020 18:16:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k1w3e-0000lU-PW for pgsql-committers@lists.postgresql.org; Sat, 01 Aug 2020 18:16:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k1w3c-0001j2-D2; Sat, 01 Aug 2020 18:16:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 071IGUar1934345; Sat, 1 Aug 2020 14:16:30 -0400 From: Tom Lane To: Etsuro Fujita cc: Thomas Munro , Etsuro Fujita , pgsql-committers Subject: Re: pgsql: Fix some issues with step generation in partition pruning. In-reply-to: References: <1914116.1596291190@sss.pgh.pa.us> Comments: In-reply-to Etsuro Fujita message dated "Sun, 02 Aug 2020 01:31:11 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1934343.1596305790.1@sss.pgh.pa.us> Date: Sat, 01 Aug 2020 14:16:30 -0400 Message-ID: <1934344.1596305790@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Etsuro Fujita writes: > On Sat, Aug 1, 2020 at 11:13 PM Tom Lane wrote: >> Sure looks that way, doesn't it? I'm just now working to reproduce >> on gaur's host and poke into it with a debugger. More news in an >> hour or two (it's slow :-(). > Thanks for that! I've concluded that this is probably a compiler bug. It doesn't fail at optimization level -O0 or -O2, only -O1; and trying to step through gen_partprune_steps_internal() suggests that the part_scheme local variable is changing value, which it surely should not. Since gaur is running an ancient gcc version, and -O1 is doubtless a pretty under-tested optimization level, bugs there are not so surprising. There wasn't any amazingly good reason to be using -O1 for gaur, so I've switched the animal to use -O2. I expect it'll go back to green in a few hours. regards, tom lane