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 1kjr6Y-0007DV-Nn for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2020 21:53:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kjr6W-0005IL-8Q for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Nov 2020 21:53:04 +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 1kjr6V-0005IE-SN for pgsql-hackers@lists.postgresql.org; Mon, 30 Nov 2020 21:53:03 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjr6S-00079V-VK for pgsql-hackers@lists.postgresql.org; Mon, 30 Nov 2020 21:53:02 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 36825E9E; Mon, 30 Nov 2020 16:52:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 30 Nov 2020 16:52:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=17MAMsYw/tMnwKhXO nV2+p/PRy3DNT/cSQ4JmmeKqEM=; b=WMDJwjxMuPBHFU1ImNA/Xwiddot7Su6FV aBrCI6lXPcBJeEjZ9mu/dLWWWCWkYzJJsPfi2Ze35wBPWmt5tqFv3HYelQiKuHnU hoQf2fQfdUaxZ89zYbxmXC/onMI/Ta2FYztqEA+QVU4l73px6SB8rDOwTi63hNCy kApH1B9aM0YU0RHgQkagrdWw3UkMUMKb9sjjm9dhkO3AsmtqO16LcckTPPs/8K1r TbZlOWpIfxxAXmUOdJUbyOQwBsZ7tGsJnMEE7rgq0Jm9FOcdgJrAe++Fch5q2V2W 5ZuJXeeUhjpe/9vxqdWKP2na9K0817vWVL3+o/ENSZb1GyzJtBUWw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeitddgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtuggjfgesmhdtreertdervdenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepieeghfelueduheegtdekjeehueffvddujefgteduieek jefhudefgeefiedvjeetnecukfhppeduledtrdelhedrudekrdejleenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.18.79]) by mail.messagingengine.com (Postfix) with ESMTPA id D00C33064AA7; Mon, 30 Nov 2020 16:52:57 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 674FB2A14FE; Mon, 30 Nov 2020 18:52:55 -0300 (-03) Date: Mon, 30 Nov 2020 18:52:55 -0300 From: Alvaro Herrera To: Michael Paquier Cc: James Coleman , David Johnston , PostgreSQL Developers , Andres Freund Subject: Re: [DOC] Document concurrent index builds waiting on each other Message-ID: <20201130215255.GA4219@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <20200930091010.GU1996@paquier.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2020-Sep-30, Michael Paquier wrote: > + > + CREATE INDEX (including the CONCURRENTLY > + option) commands are included when VACUUM calculates what > + dead tuples are safe to remove even on tables other than the one being indexed. > + > FWIW, this is true as well for REINDEX CONCURRENTLY because both use > the same code paths for index builds and validation, with basically > the same waiting phases. But is CREATE INDEX the correct place for > that? Wouldn't it be better to tell about such things on the VACUUM > doc? Yeah, I think it might be more sensible to document this in maintenance.sgml, as part of the paragraph that discusses removing tuples "to save space". But making it inline with the rest of the flow, it seems to distract from higher-level considerations, so I suggest to make it a footnote instead. I'm not sure on the wording to use; what about this? --6c2NcOVqGQ03X4Wi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v5-0001-Note-CIC-and-RC-in-vacuum-s-doc.patch" From 6c9ad72e4e61dbf05f34146cb67706dd675a38f0 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 30 Nov 2020 18:50:06 -0300 Subject: [PATCH v5] Note CIC and RC in vacuum's doc Per James Coleman --- doc/src/sgml/maintenance.sgml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 4d8ad754f8..d68d7f936e 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -159,7 +159,17 @@ concurrency control (MVCC, see ): the row version must not be deleted while it is still potentially visible to other transactions. But eventually, an outdated or deleted row version is no - longer of interest to any transaction. The space it occupies must then be + longer of interest to any transaction. + + + Note that VACUUM needs to retain tuples that are + nominally visible to transactions running + CREATE INDEX CONCURRENTLY or + REINDEX CONCURRENTLY, even when run on tables + other than the tables being indexed. + + + The space it occupies must then be reclaimed for reuse by new rows, to avoid unbounded growth of disk space requirements. This is done by running VACUUM. -- 2.20.1 --6c2NcOVqGQ03X4Wi--