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 1pCxYx-0002uH-WD for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Jan 2023 06:47:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pCxYw-0005zt-TL for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Jan 2023 06:47:46 +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 1pCxYw-0005wt-JR for pgsql-hackers@lists.postgresql.org; Wed, 04 Jan 2023 06:47:46 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pCxYt-0004Mr-EF for pgsql-hackers@postgresql.org; Wed, 04 Jan 2023 06:47:45 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id B93B43200A08; Wed, 4 Jan 2023 01:47:41 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 04 Jan 2023 01:47:41 -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=fm2; t=1672814861; x=1672901261; bh=wpP2dTv/pc UPHPLkOUVcWI3KizKgKdqKtlvlF+8QZ/c=; b=Mq/g6m3UOn5SaAMycgC5H7U1bd iJEAVCFESNd9X65CWROKp8PrrdxxuoigvNU2u075a3IOqCvvAbmQRLuTMcfLWLUB iUrAbmOw0ghHJu9CbXFOK05nynbKduJ+nmTgg3lrs/CimZXJ/Y8LIFhx+dbY9iYa gyzLs/rKiXUrlmTw1C3HfbDZPteLrlSlK6u3+c6evQXdaJwS5iKtOkGBEcNGD2Z6 kyRfjud6HoBhvQBIcE2Bhnc++6cY+isqgm88sM6F6CAGu0S0ASX/0nwNUKQcN3LX IPMIiyTAXHcthGFWgm24iPE17+8454dA0mQzsr1NdxZSPrrDsf2hPZIY2hsg== 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= fm2; t=1672814861; x=1672901261; bh=wpP2dTv/pcUPHPLkOUVcWI3KizKg KdqKtlvlF+8QZ/c=; b=MMG6WjNvmFIkjqnZeeHIKA6u7ILAUq8B4/QKMQ+bjcb3 sIU7MYv7foi2sjPUmWSb4XKJ2YTwOyYfiAbAF8N3+jgSMOYHjq+gaGIuNPF30Ayp ZWFkLx6HrRtEJTEBop2gKfEIre01LPq3mRbY2Q/OfOSyBLxAy9b7TB/8/6YJjRvt Yoh0CfnD3dU3b3pkIERurP/62vivxI/s1wc0FncbWOg/sfbqAoSw9AxIbqKtzAJC DgG3lukGM1aRt/UZsIZq+9dTklwwNTJCuS/x9xgwP8UTNLSou1oSXFMDM8Lan1B0 +vLJgAU9HaTx5/9zsGhrazMMV0rMxw3JhzzgpgbjFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeehgddutdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Jan 2023 01:47:41 -0500 (EST) Date: Tue, 3 Jan 2023 22:47:40 -0800 From: Andres Freund To: Peter Geoghegan Cc: pgsql-hackers@postgresql.org Subject: Re: pgsql: Delay commit status checks until freezing executes. Message-ID: <20230104064740.6mnwcml6oqp3sxnr@awork3.anarazel.de> References: <20230104005433.k5aptjbqx75fksfm@awork3.anarazel.de> <20230104035636.hy5djyr2as4gbc4q@awork3.anarazel.de> <20230104063325.32xq2gpnwlelhogo@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-03 22:41:35 -0800, Peter Geoghegan wrote: > On Tue, Jan 3, 2023 at 10:33 PM Andres Freund wrote: > > I'd say a comment above TransactionIdDidAbort() referencing an overview > > comment at the top of the file? I think it might be worth moving the comment > > from heapam_visibility.c to transam.c? > > What comments in heapam_visibility.c should we be referencing here? I > don't see anything about it there. I have long been aware that those > routines deduce that a transaction must have aborted, but surely > that's not nearly enough. That's merely not being broken, without any > explanation given as to why. IMO the comment at the top mentioning why the TransactionIdIsInProgress() calls are crucial / need to be done first would be considerably more likely to be found in transam.c than heapam_visibility.c. And it'd make sense to have the explanation of why TransactionIdDidAbort() isn't the same as !TransactionIdDidCommit(), even for !TransactionIdIsInProgress() xacts, near the explanation for doing TransactionIdIsInProgress() first. Greetings, Andres Freund