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 1pFkBS-0001DU-Pu for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 23:07:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFkBR-0008Cz-NL for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 23:07:01 +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 1pFkBR-0008Co-Dl for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 23:07:01 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFkBP-0001Yc-6m for pgsql-hackers@postgresql.org; Wed, 11 Jan 2023 23:07:00 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E7C3D3200034; Wed, 11 Jan 2023 18:06:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 11 Jan 2023 18:06:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1673478417; x=1673564817; bh=2JLTAtYhVc WBCTnhEKbtaXWQFF/iztexmBBLYsW+Z9A=; b=vNfRII1V+VzPUmcvHnMK522QJh QRRNly3ucoahgptFKk0G2jbEHLUA8QVV0zr+rCAugtoYRSGk5+BDKyDYPg6V5ST9 Jrg6bAUMjm94Ko0Xgxu70cL01GumdFA2ajiZZZzL6Q3tbMRAI1cU0T1I/q++K6Mb 7r0BNtMqAwLEvoKJLoWNIKqhzSPTp+Ms6Fkhdk2/BSAT7NldDAK6dT/xSDreOESe GYl2qCIEhFJZ9uhRQ/BYu48Zvx+AtVLE7iGa3m28LO0c9w9jx0APhFWfAKI9wBGy y3lAupUVD8e/hmEc/rITuQ7ONPRygm1Kxdg9CFybj0jucvV4mClrLhmD8qhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1673478417; x=1673564817; bh=2JLTAtYhVcWBCTnhEKbtaXWQFF/i ztexmBBLYsW+Z9A=; b=Zl9/vaRxVPsIfOtCcIMtqkhe2KY1GUHK5H4v4OM8qUPe ceNxCXDTPHOfPj3vaoJNRPyO0+HcOcR63P+OMpZCoU+ZHCHA5W+DITTTeF1ZdfN5 pKWQcmG7dbJuRvOFQOGu+8QhqVbwpS6AhcLK6mAGtY9UHomp6VA1aN15WogyquP0 gEbGSi+Fr48G1Bgc43JMrvzxhTtPfdLwhYFuGSW9zyZyDHxgRuw5mLN5RE8Y8KyA 6BwPxvsCMxWxfqbXm4CB8b0yKcu/dtecopQ8RFXVr7+p6czTmaeJvraQ+91jMe1H PjboKOl7jF9JEJKY48jT9g8sLwPpUCkF4FyPM3J3gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleehgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedvffefvefhteevffegieetfefhtddvffejvefhueetgeeludehteevudei tedtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Jan 2023 18:06:57 -0500 (EST) Date: Wed, 11 Jan 2023 15:06:56 -0800 From: Andres Freund To: Peter Geoghegan Cc: pgsql-hackers@postgresql.org Subject: Re: pgsql: Delay commit status checks until freezing executes. Message-ID: <20230111230656.q4ur4a2ww7plmaau@awork3.anarazel.de> References: <20230104063325.32xq2gpnwlelhogo@awork3.anarazel.de> <20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de> <20230107214756.fyrk735xkeetkkby@awork3.anarazel.de> <20230108032549.xumh45fv6dicimmh@awork3.anarazel.de> 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 Hi, On 2023-01-11 14:29:25 -0800, Peter Geoghegan wrote: > On Sat, Jan 7, 2023 at 7:25 PM Andres Freund wrote: > > Probably a good idea, although it doesn't neatly fit right now. > > I'll leave it for now. > > Attached is v2, which changes things based on your feedback. Would > like to get this out of the way soon. Makes sense. It's clearly an improvement. > + * We can't use TransactionIdDidAbort here because it won't treat transactions > + * that were in progress during a crash as aborted by now. We determine that > + * transactions aborted/crashed through process of elimination instead. s/by now//? > * When using an MVCC snapshot, we rely on XidInMVCCSnapshot rather than > * TransactionIdIsInProgress, but the logic is otherwise the same: do not > diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c > index 3a28dcc43..7629904bb 100644 > --- a/src/backend/access/transam/transam.c > +++ b/src/backend/access/transam/transam.c > @@ -110,7 +110,8 @@ TransactionLogFetch(TransactionId transactionId) > * transaction tree. > * > * See also TransactionIdIsInProgress, which once was in this module > - * but now lives in procarray.c. > + * but now lives in procarray.c, as well as comments at the top of > + * heapam_visibility.c that explain how everything fits together. > * ---------------------------------------------------------------- > */ +1 Greetings, Andres Freund