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 1ow7BN-0000zU-NK for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Nov 2022 19:37:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ow7BM-0003GV-JO for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Nov 2022 19:37:48 +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 1ow7BM-0003GM-9n for pgsql-hackers@lists.postgresql.org; Fri, 18 Nov 2022 19:37:48 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ow7BJ-0001jK-VS for pgsql-hackers@postgresql.org; Fri, 18 Nov 2022 19:37:47 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1ow7BD-006P6H-T3; Fri, 18 Nov 2022 14:37:39 -0500 Date: Fri, 18 Nov 2022 14:37:39 -0500 From: Bruce Momjian To: Simon Riggs Cc: Laurenz Albe , Robert Treat , Alvaro Herrera , Erik Rijkers , Justin Pryzby , PostgreSQL Hackers Subject: Re: New docs chapter on Transaction Management and related changes Message-ID: References: <20221014084615.chvollxv3oz43oqu@alvherre.pgsql> <80a5fd9c080d66e62f90c9565e3e1b54e61f584c.camel@cybertec.at> 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 Tue, Nov 15, 2022 at 10:16:44AM +0000, Simon Riggs wrote: > On Tue, 8 Nov 2022 at 03:41, Bruce Momjian wrote: > > > > On Mon, Nov 7, 2022 at 10:58:05AM +0000, Simon Riggs wrote: > > > What I've posted is the merged patch, i.e. your latest patch, plus > > > changes to RELEASE SAVEPOINT from you on Oct 16, plus changes based on > > > the later comments from Robert and I. > > > > Thanks. I have two changes to your patch. First, I agree "destroy" is > > the wrong word for this, but I don't think "subcommit" is good, for > > three reasons: > > > > 1. Release merges the non-aborted changes into the previous transaction > > _and_ frees their resources --- "subcommit" doesn't have both meanings, > > which I think means if we need a single word, we should use "release" > > and later define what that means. > > > > 2. The "subcommit" concept doesn't closely match the user-visible > > behavior, even though we use subtransactions to accomplish this. Release > > is more of a rollup/merge into the previously-active > > transaction/savepoint. > > > > 3. "subcommit" is an implementation detail that I don't think we should > > expose to users in the manual pages. > > I don't understand this - you seem to be presuming that "subcommit" > means something different and then objecting to that difference. > > For me, "Subcommit" exactly matches what is happening because the code > comments and details already use Subcommit in exactly this way. > > The main purpose of this patch is to talk about what is happening > using the same language as we do in the code. The gap between the code > and the docs isn't helping anyone. I didn't think that was the purpose, and certainly not in the reference/ref/man pages. I thought the purpose was to explain the behavior clearly, and in the "Internals" section, the internal API we expose to users. I didn't think matching the code was ever a goal --- I thought that is what the README files are for. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson