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 1s7fxV-006mSv-Ow for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2024 18:36:07 +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 1s7fxV-00DC7o-MS for pgsql-hackers@arkaria.postgresql.org; Thu, 16 May 2024 18:36:05 +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 1s7fxV-00DC7g-Cc for pgsql-hackers@lists.postgresql.org; Thu, 16 May 2024 18:36:05 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s7fxR-000a8F-Re for pgsql-hackers@postgresql.org; Thu, 16 May 2024 18:36:04 +0000 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7e201ab539eso67957439f.1 for ; Thu, 16 May 2024 11:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715884561; x=1716489361; darn=postgresql.org; h=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=gA4IpanLj9aXWYRJGBVEXQOH4xCtaBpM15sjvQkzu8o=; b=jXwR0INEcd5VmTZWA+SA7D4FDogndXyBCI91eHhKTR3QO+N7dI9AC8y2Xd3YQWYRCq +u4SrUKF6CYangHrj9qq8X3lP3ncWdfNhDajB94cIf94ivBepDIvUYZNzgedyoU08uql JsbG8WvAchE2AbUr0j9dTmD3zqm8tsycI5KrGv6PUOc7KeFWy98z2TxqJUsWwTRsSaYf 7pRZQNmwBpOSGMs+ChrPBYNaLgfyZejsRjxuoSC+bPQFiN/w/dt1wxg1fpgz2mgm1V7N EKGMc7ynHcuN4jE3SRSZ+HRAo1qAI4dInnsjEwoidj8H3O8L7+Z1TSPiLufBGSZEWFOP 5gAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715884561; x=1716489361; h=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=gA4IpanLj9aXWYRJGBVEXQOH4xCtaBpM15sjvQkzu8o=; b=o/+bBsvBy4piOSL7KS3q8B1H/JrnMnBjgel0CXTOLicmzt0mfhSkIzwvK+gd/+R7oX x9SS/OyGiGK5RSVIZ/WWwaQ0ZrD1wQcHIVZhlO2uoaDeBoFUGVOCLoZOIRdADLk1njbX IupOXo8x9cJWw7YbK+udfbTGO+OEzG2bGfa+mI63w49NRJoBXJm4XUw8btCJ/AVqJFQQ Xh6ri4gSb2SAt08HOW6JRcx8qoVYYIQfdV6ke5UpJSDrAUl2XO+eIoDsBtny7GVDJzDC OYIHUOHLxXTHnAraMhrQqwf8sLJHCk0PD+IG+vXhO0YSBaSXr6ryWH1E0TtXwAx+/Imk eWhQ== X-Forwarded-Encrypted: i=1; AJvYcCU6Shfk31PQP2mAbcASD6AaH9cWtVMR3SdMs6rQbA+4r5K5ay33B+mOBxc232en481rMyxmP0DRXYeM3sep20+zt2jtV4o63zIlLBDF X-Gm-Message-State: AOJu0Yxk+jhnm9FQRdsSE0kV8qnmhUOv6/sI5SvRlUyQzd5VE6z+H+5I 9im6qUmPt4vxSghUxDJM8XPaBRTspuEuPyKyT2OzskdF9WLLMJyP X-Google-Smtp-Source: AGHT+IHo8ZFqXpAjqM06Dwe5QaF2W0uOhaxk1xHLQB6srZBXojgr9yWH5MrA3Gvvj2v5AC8/mB9YUA== X-Received: by 2002:a05:6e02:1c0c:b0:36c:d27:472f with SMTP id e9e14a558f8ab-36cc14ecddfmr256951065ab.29.1715884560583; Thu, 16 May 2024 11:36:00 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-36cceab150bsm28451195ab.10.2024.05.16.11.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:36:00 -0700 (PDT) Date: Thu, 16 May 2024 13:35:58 -0500 From: Nathan Bossart To: Melanie Plageman Cc: Thomas Munro , Michael Paquier , Fujii Masao , "pgsql-hackers@postgresql.org" , Andres Freund Subject: Re: race condition when writing pg_control Message-ID: <20240516183558.GA1620903@nathanxps13> References: <20200523053935.GB266978@paquier.xyz> <20200527071053.GD103662@paquier.xyz> <20200602052427.GC3594@paquier.xyz> <20200603020259.GA89559@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 16, 2024 at 12:19:22PM -0400, Melanie Plageman wrote: > Today, after committing a3e6c6f, I saw recovery/018_wal_optimize.pl > fail and see this message in the replica log [2]. > > 2024-05-16 15:12:22.821 GMT [5440][not initialized] FATAL: incorrect > checksum in control file > > I'm pretty sure it's not related to my commit. So, I was looking for > existing reports of this error message. Yeah, I don't see how it could be related. > It's a long shot, since 0001 and 0002 were already pushed, but this is > the only recent report I could find of "FATAL: incorrect checksum in > control file" in pgsql-hackers or bugs archives. > > I do see this thread from 2016 [3] which might be relevant because the > reported bug was also on Windows. I suspect it will be difficult to investigate this one too much further unless we can track down a copy of the control file with the bad checksum. Other than searching for any new code that isn't doing the appropriate locking, maybe we could search the buildfarm for any other occurrences. I also seem some threads concerning whether the way we are reading/writing the control file is atomic. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com