Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tdoHD-009eb6-Do for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2025 10:29:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tdoHB-00HGEn-EN for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2025 10:29:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tdoHA-00HGEe-QX for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2025 10:29:29 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tdoH8-002Rgb-0R for pgsql-hackers@postgresql.org; Fri, 31 Jan 2025 10:29:27 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 7553D1140077; Fri, 31 Jan 2025 05:29:25 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 31 Jan 2025 05:29:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738319365; x=1738405765; bh=H uKGHI+ZHuyFX0CjNMq2KPNkn/YAMLhUv++fxzycIpU=; b=y9jSPYsd4DiuDeUyC 1gxxJ1Ki/ZqOfSaiAA3ZJo3tSuwgX7Rf3yyMtsA/y59IudPx/77q240q+kEjnjQ2 9ciozORsMI1DAaLj/+Rlbw05BRhk5Gg1VvWt8+eTxhN1l0JU9GWLc4s/upXU4/P2 ICDOsFk8Lan/WomQMxmYABuWVA4Ayfiga8ruKdEJ5MaaF7oR9xPNJVgWPpG9JylF Ithp/q/8MbNKmlWWjre2l9k1ftz5R8K7XZa7w62pVunltOaQ0kgBwlyuqsa4/oXb 4E2yToh1faZKLXKzDdTGtdBLS4W7UsKPWCoE5AnYfbsNrGZHBRnoB9CHlMoFHuWZ mLqgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekhedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffh jeejhffgieeuueekjeekfffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprh gtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrhhestgihsggv rhhtvggtrdgrthdprhgtphhtthhopehprghvvghlrdhsthgvhhhulhgvsehgmhgrihhlrd gtohhmpdhrtghpthhtoheprhgvshhhkhgvkhhirhhilhhlsehgmhgrihhlrdgtohhmpdhr tghpthhtohepiihhjhifphhkuhesghhmrghilhdrtghomhdprhgtphhtthhopehmsggrnh gtkhesghhmgidrnhgvthdprhgtphhtthhopehmihgthhgrvghlsehprghquhhivghrrdig hiiipdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrd horhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 31 Jan 2025 05:29:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738319362; bh=Q4bLIUoyqm1Pm6Vn08TiHATu5A2gRGkExhs/AMAl8p8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=PvKqMsImF3NWbEkfL3ck/g6opfLe6PwmNFVAdaEnj7/ngRLW9JFItgKJN67ala0xM 43ozX62yWeCgj8v/jIhfh5JuMAo3hlOww0yyFep2jQxdgTpTUsROvaQuRNf9t/Pa9N MOENptb4VcRrlOeWBPTlgG9083oVgY1MoApCwTjBNfJY5/Dgv1O4q4j3TQz2gMoOHc 15dwy8CT/PHZJFv8bYaV3lI4bzivroURtoHgkR8PsF6yV20up7i+rc9iEDH/octVkm pH7VxYRkYLrUMfJECDaDC1LqD7+Rai7XOrMNECnVB8x0nty4i2iv1PmflgQJAjHcpf UKhGM1+pY+52g== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id CA5658C; Fri, 31 Jan 2025 11:29:22 +0100 (CET) Date: Fri, 31 Jan 2025 11:29:22 +0100 From: Alvaro Herrera To: Antonin Houska Cc: Michael Banck , Junwang Zhao , Kirill Reshke , Pavel Stehule , Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? Message-ID: <202501311029.oh42cqhanxjy@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <24725.1738318524@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Jan-31, Antonin Houska wrote: > Alvaro Herrera wrote: > > > Something that Robert Haas just mentioned to me is handling of row > > locks: if concurrent transactions are keeping rows in the original table > > locked (especially SELECT FOR KEY SHARE, since that's not considered by > > logical decoding at present and it would be possible to break foreign > > keys if we just do nothing), them we need these to be "transferred" to > > the new table somehow. > > The current implementation acquires AccessExclusiveLock on the table > (supposedly for very short time) so it can swap the table and index > files. Once we have that lock, I think the transactions holding the row locks > should no longer be running. Or can the row lock "survive" the table lock > somehow? Oh right, I forgot about this step. That seems like it should be sufficient to protect against that problem. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ Al principio era UNIX, y UNIX habló y dijo: "Hello world\n". No dijo "Hello New Jersey\n", ni "Hello USA\n".