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 1t7QRI-001pu3-FA for pgsql-committers@arkaria.postgresql.org; Sun, 03 Nov 2024 02:34:04 +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 1t7QQH-009YlC-5S for pgsql-committers@arkaria.postgresql.org; Sun, 03 Nov 2024 02:33:01 +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 1t7QQG-009Yl4-U8 for pgsql-committers@lists.postgresql.org; Sun, 03 Nov 2024 02:33:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t7QQE-004Cxm-P7 for pgsql-committers@lists.postgresql.org; Sun, 03 Nov 2024 02:33:00 +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 4A32Wuk92317337; Sat, 2 Nov 2024 22:32:56 -0400 From: Tom Lane To: Noah Misch cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Move I/O before the index_update_stats() buffer lock region. In-reply-to: References: Comments: In-reply-to Noah Misch message dated "Sat, 02 Nov 2024 16:08:47 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2317335.1730601176.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 02 Nov 2024 22:32:56 -0400 Message-ID: <2317336.1730601176@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > Move I/O before the index_update_stats() buffer lock region. In branches before 17, this commit is causing some compilers to complain: index.c: In function 'index_update_stats': index.c:2913:24: warning: 'relpages' may be used uninitialized in this fun= ction [-Wmaybe-uninitialized] if (rd_rel->relpages !=3D (int32) relpages) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ I'm seeing that with RHEL8's gcc 8.5.0, and trawling the buildfarm shows at least 40 animals similarly unhappy. (I noticed this because mamba, which is using -Werror, is actually failing.) regards, tom lane