Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNDhf-004N0C-Po for pgsql-committers@arkaria.postgresql.org; Sat, 22 Jul 2023 14:35:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qNDhd-00F7Yb-Tw for pgsql-committers@arkaria.postgresql.org; Sat, 22 Jul 2023 14:35:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNDhd-00F7YT-IE for pgsql-committers@lists.postgresql.org; Sat, 22 Jul 2023 14:35:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qNDha-000s3v-Ux for pgsql-committers@lists.postgresql.org; Sat, 22 Jul 2023 14:35:24 +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 36MEZKpk1163654; Sat, 22 Jul 2023 10:35:20 -0400 From: Tom Lane To: Bharath Rupireddy cc: Jeff Davis , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix calculation of relid sets for partitionwise child joins. In-reply-to: References: Comments: In-reply-to Bharath Rupireddy message dated "Sat, 22 Jul 2023 09:11:08 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1163652.1690036520.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 22 Jul 2023 10:35:20 -0400 Message-ID: <1163653.1690036520@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bharath Rupireddy writes: > On Sat, Jul 22, 2023 at 4:22 AM Jeff Davis wrote: >> On Fri, 2023-07-21 at 16:00 +0000, Tom Lane wrote: >>> Fix calculation of relid sets for partitionwise child joins. >> In CI, I'm seeing a compiler warning here: >> [22:28:11.772] joinrels.c: In function ‘try_partitionwise_join’: >> [22:28:11.772] joinrels.c:1546:11: error: variable ‘child_joinrelids’ >> set but not used [-Werror=unused-but-set-variable] Right, I failed to test it without --enable-cassert, so I did not see this warning. > Might have to mark the child_joinrelids PG_USED_FOR_ASSERTS_ONLY. It seemed better to me to put the adjust_child_relids call into the Assert macro, so the compiler knows it doesn't have to run adjust_child_relids in the non-Assert case. regards, tom lane