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 1t7R0g-001skP-SA for pgsql-committers@arkaria.postgresql.org; Sun, 03 Nov 2024 03:10:38 +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 1t7R0e-009nrV-GY for pgsql-committers@arkaria.postgresql.org; Sun, 03 Nov 2024 03:10:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t7R0e-009nrM-9O for pgsql-committers@lists.postgresql.org; Sun, 03 Nov 2024 03:10:36 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t7R0a-004Rd1-Fo for pgsql-committers@lists.postgresql.org; Sun, 03 Nov 2024 03:10:36 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-720b2d8bb8dso2391622b3a.1 for ; Sat, 02 Nov 2024 20:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1730603430; x=1731208230; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=cMeiIMFNGA94lfSqL4RRMBnZznvhSQxaKFjr+4lhV/Y=; b=FLhiyAtDZ7JGZnl3lO8jaR3ETMUYBGRanvMElg3P8Wv8NT1GWcJtGRF+bD2RIRu7gn yVTJV5zOu3zminPvjYAHHmpCkWPBx2A8yFkkVQHViq0ltZrha1yhx6W13uEyfDRURbKd fFSYISnh+nsJzBpGVcoa+pJUa3g2cALxVvQYg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730603430; x=1731208230; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cMeiIMFNGA94lfSqL4RRMBnZznvhSQxaKFjr+4lhV/Y=; b=Mo1VfNJ+tGkx2zPNrI3GoYnAlYnQHQc+pxOBCsLUI2FxQb+MLQIlShKq0Y9887ZxIj UEe9OUz8nSYp21zSOHnsenWjcBPEP4VlcRnL2JkGrMYf95H/Yr8w3HiRIAjpdk+PhO8E oHX2+KbBSgQJw3Hac4kg2QnAgh4OK3h0qA49N/9NsrCjGWmiRTlgbLxHhJ7hskcQJrnD bUKo8K5fpM6h3Cea6dfwZY/gd1wUwKbicIn30JjKEa4tTDP2G9UIdiFHzIf3gzoqNw0m zxyQnlzRYXR+9v8fD/rbm2ysss4eKWSo7QHd0Ntes/0oAN+b0VG4bol6MKRFkjQ0aUFn pr6w== X-Gm-Message-State: AOJu0YxDfnUnHbbzrUGOBlv1bVwhI+UzZ2vs5BBE3tski+OJ+qUPcyrj OGPb0QW6l95ulYve52FFK3KShGCNY+9NB8Iz8678huv26SzKH2KI5PgN90+n3Q== X-Google-Smtp-Source: AGHT+IHOnTB+mrYmr4gJx9e5DG8tvCjMC2CBLHOGw5Qx/GB8mt3yvwx34kSSRVCKDqPrJ5MLCh9I3g== X-Received: by 2002:a05:6a00:1742:b0:71e:722b:ae1d with SMTP id d2e1a72fcca58-72063059df3mr36054922b3a.25.1730603430202; Sat, 02 Nov 2024 20:10:30 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-720bc1b87e0sm4920470b3a.36.2024.11.02.20.10.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Nov 2024 20:10:29 -0700 (PDT) Date: Sat, 2 Nov 2024 20:10:27 -0700 From: Noah Misch To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Move I/O before the index_update_stats() buffer lock region. Message-ID: <20241103031027.09.nmisch@google.com> References: <2317336.1730601176@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2317336.1730601176@sss.pgh.pa.us> User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Nov 02, 2024 at 10:32:56PM -0400, Tom Lane wrote: > 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 function [-Wmaybe-uninitialized] > if (rd_rel->relpages != (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.) Hopefully now the code won't fool any compiler.