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 1ot5ZT-0001g0-8k for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Nov 2022 11:18:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ot5ZS-0005qO-50 for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Nov 2022 11:18:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ot5ZR-0005o3-9h for pgsql-hackers@lists.postgresql.org; Thu, 10 Nov 2022 11:18:09 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ot5ZN-0003JL-3X for pgsql-hackers@postgresql.org; Thu, 10 Nov 2022 11:18:08 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A057E5C0260; Thu, 10 Nov 2022 06:18:02 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 10 Nov 2022 06:18:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1668079082; x=1668165482; bh=+ uq8PDcbTHstqhXyUj8aZ1VRwM4MKPGzXqa497qbcZo=; b=uJrAFfsl0bPKxhsBK c+HyBs9iOByg3d8hGTSxLf6aqVe925RlPAjj8RQ/SDvNmT1DlX/J/WlNNLZLPt+s 9p1QayR9aldqy0UAxivmr9Kl8XBIE0Ww1gNNttAvDa189U7sGoIRKJWznkiQ6ljl tjqOgUzhgyIMHIUZben/JarW6uUrPt5LWoUSYseBJ4X+STEY8xVodsyeHCCE3PLs K628+kKKMbdLR5VsIkvNb8z4nYU83Lejrl9ZJZMXN/DF3o0WLtipxTYoRXdvsDPs 35wNG3SQ/PNXRxSIVOsfdhvWIibF1DsFgW6hvA6s2EeSLTjSomoZ+05+H0UzcCku kWZSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeeggddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Nov 2022 06:18:00 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6251939B; Thu, 10 Nov 2022 12:17:57 +0100 (CET) Date: Thu, 10 Nov 2022 12:17:57 +0100 From: Alvaro Herrera To: Laurenz Albe Cc: Robert Treat , Simon Riggs , Bruce Momjian , Erik Rijkers , Justin Pryzby , PostgreSQL Hackers Subject: Re: New docs chapter on Transaction Management and related changes Message-ID: <20221110111757.nsfkjm5d64skmpiu@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Nov-10, Laurenz Albe wrote: > On Wed, 2022-11-09 at 09:16 -0500, Robert Treat wrote: > > > > -      If AND CHAIN is specified, a new transaction is > > > > +      If AND CHAIN is specified, a new unaborted transaction is > > > >        immediately started with the same transaction characteristics (see > > >        linkend="sql-set-transaction"/>) as the just finished one.  Otherwise, > > > >        no new transaction is started. > > > > > > I don't think that is an improvement.  "Unaborted" is an un-word.  A new transaction > > > is always "unaborted", isn't it? > > > > I thought about this as well when reviewing it, but I do think > > something is needed for the case where you have a transaction which > > has suffered an error and then you issue "rollback and chain"; if you > > just say "a new transaction is immediately started with the same > > transaction characteristics" it might imply to some the new > > transaction has some kind of carry over of the previous broken > > transaction... the use of the word unaborted makes it clear that the > > new transaction is 100% functional. > > A new transaction is never aborted in my understanding. Being aborted > is not a characteristic of a transaction, but a state. I agree, but maybe it's good to make the point explicit, because it doesn't seem obvious. Perhaps something like "If X is specified, a new transaction (never in aborted state) is immediately started with the same transaction characteristics (see X) as the just finished one. Otherwise ..." Getting the wording of that parenthical comment right is tricky, though. What I propose above is not great, but I don't know how to make it better. Other ideas that seem slightly worse but may inspire someone: ... a new transaction (which is never in aborted state) is ... ... a new transaction (not in aborted state) is ... ... a new transaction (never aborted, even if the previous is) is ... ... a new (not-aborted) transaction is ... ... a new (never aborted) transaction is ... ... a new (never aborted, even if the previous is) transaction is ... ... a new (never aborted, regardless of the status of the previous one) transaction is ... Maybe there's a way to reword the entire phrase that leads to a better formulation of the idea. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/