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 1ojGKm-0002w3-BX for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Oct 2022 08:46:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ojGKl-0006vO-8D for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Oct 2022 08:46:23 +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 1ojGKk-0006uY-V5 for pgsql-hackers@lists.postgresql.org; Fri, 14 Oct 2022 08:46:22 +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 1ojGKi-0006tD-HS for pgsql-hackers@postgresql.org; Fri, 14 Oct 2022 08:46:21 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id EC1DC3200916; Fri, 14 Oct 2022 04:46:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 14 Oct 2022 04:46:19 -0400 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=fm3; t=1665737178; x=1665823578; bh=w WDvj2dmte7V5XTPONT/n+PfYJT5RTy7xBpNZ7y64CM=; b=W5BVKUfm8lb+zcyFt in2BfNVVbDmOCobQ2ym3PFu7tO+PRu+4BR3mk34vJPhKf1AqA2fNWY++WbDVZFJk 6Mk05heqVL4dpcOQJLEkRJGwXOwMMxmb6jPt3KAD8m4M9lOx9v+0Zs/6pQa34VEJ 1SR6Q1vANQQRQ8vWhgzn1Hyhr0ZJn+yD8nOzmvAvoGv6r1x3ap2zsrMsiW5iRtax W9nTdkOgMLPMvaKxNo28HFf7uvh1hRWpfeCoiimyy2CKZzZYO7Nx5TBsN/0F7q3C RzWgnEk6amLcBsVfoVUGp/Mj+fsQkkdTRZ7cQw7/s25geqTNxOJAE5+QctwiYmUB OySZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekvddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Oct 2022 04:46:17 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AC66468; Fri, 14 Oct 2022 10:46:15 +0200 (CEST) Date: Fri, 14 Oct 2022 10:46:15 +0200 From: Alvaro Herrera To: Bruce Momjian Cc: Erik Rijkers , Simon Riggs , Robert Treat , Justin Pryzby , PostgreSQL Hackers Subject: Re: New docs chapter on Transaction Management and related changes Message-ID: <20221014084615.chvollxv3oz43oqu@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 +1 for this new chapter. This latest patch looks pretty good. I think that introducing the concept of "sub-commit" as in Simon's follow-up patch clarifies things, though the word itself looks very odd. Maybe it's okay. The addition of the savepoint example looks good also. On 2022-Oct-13, Bruce Momjian wrote: > + > + PostgreSQL supports a two-phase commit (2PC) > + protocol that allows multiple distributed systems to work together > + in a transactional manner. The commands are PREPARE > + TRANSACTION, COMMIT PREPARED and I suggest/request that we try to avoid breaking tagged constants in DocBook; doing so makes it much easier to miss them later when grepping for them (don't laugh, it has happened to me). Also, it breaks formatting in some weird cases. I know this makes editing a bit harder because you can't just reflow with your editor like you would normal text. So this'd be: + in a transactional manner. The commands are PREPARE TRANSACTION, + COMMIT PREPARED and with whatever word wrapping you like, except breaking between PREPARE and TRANSACTION. > + > + In addition to vxid and xid, > + when a transaction is prepared it is also identified by a Global > + Transaction Identifier (GID). GIDs > + are string literals up to 200 bytes long, which must be > + unique amongst other currently prepared transactions. > + The mapping of GID to xid is shown in + linkend="view-pg-prepared-xacts">pg_prepared_xacts. > + Maybe say "is prepared for two-phase commit", to make the topic of this paragraph more obvious? > + > + Lock waits on table-level locks are shown waiting for > + virtualxid, while lock waits on row-level > + locks are shown waiting for transactionid. > + Row-level read and write locks are recorded directly in locked > + rows and can be inspected using the > + extension. Row-level read locks might also require the assignment > + of multixact IDs (mxid). Mxids are recorded in > + the pg_multixact directory. > + Hmm, ok. > + > + The parent xid of each subxid is recorded in the > + pg_subtrans directory. No entry is made for > + top-level xids since they do not have a parent, nor is an entry made > + for read-only subtransactions. > + Maybe say "the immediate parent xid of each ...", or is it too obvious? -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Las cosas son buenas o malas segun las hace nuestra opinión" (Lisias)