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 1tWBMw-00Emwf-1O for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2025 09:31:54 +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 1tWBMv-00E1mB-49 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2025 09:31:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tWBMu-00E1m2-Pz for pgsql-hackers@lists.postgresql.org; Fri, 10 Jan 2025 09:31:52 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tWBMr-000sns-1T for pgsql-hackers@postgresql.org; Fri, 10 Jan 2025 09:31:52 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-436326dcb1cso13412745e9.0 for ; Fri, 10 Jan 2025 01:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1736501509; x=1737106309; darn=postgresql.org; h=message-id:date:content-transfer-encoding:mime-version:comments :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uw97W450iZgV7vap8rz/nSj+dQe9TQLQQygxmJ/0CkM=; b=r67r+0m+Jf5QAmgTN/HJw2CP/I0AE+oBKqkFnaB8tM7fA+o/kMayo8HIlVGVgKN0+/ 4FjipVFhzIvh25gdk8WM+tuXUca6zJkJ57HlGozSdOnUWVwGGLAElUVkzEFSqOu09TK2 eTXq37kLSs/GiMyZU5JVZ+JVMT4a5AZ1vbKO07Z+N7dKbrbzzvZ+vBLDB6hdq/cserLq vsk1cmKJ7ZFzeEaJBbQBO2FaKVrP6IhwH3N+eLP+Hsahz68wdqBNBc3pHXCtwhKfkxQv skFkX3zJ3ceOJc7+bQyIxTrCa3iH1D2dVGt0RBCPrqvUkMpfNHbLtVytunnTp54sGWLz X5qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736501509; x=1737106309; h=message-id:date:content-transfer-encoding:mime-version:comments :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uw97W450iZgV7vap8rz/nSj+dQe9TQLQQygxmJ/0CkM=; b=JqljK4hcifI0F22Dr6aQFeqyL41RFmofwfa9gxh2eGnww3qKKRjAIhVqujpwSlZCgk hUrJgjnP+JLy31PdY/CZBhaEMS5tFWHPev/WLRfe5dWomETLjN8wJW2eQQIef1ROxrJ/ YoZFdfjlIf2h4QaUk/rltes4anbWeYp8J41Ju/ilm2jOTztJ8Jbl3rMiHf1GeFNQz23r vzV50fCBQ5teUpx73veHtr0i092ep/vsmd6Qa8uloNRS60JvszHVxjohEMlYYruLeWxb 77IPQ1ovzP835r8gLrlf+kYMR4vYlEasEpcyoJyMKNRhtGDp6SmTBFr+o/BdFed5M9IA cTag== X-Forwarded-Encrypted: i=1; AJvYcCWLNXooC/ncWmhMNFpTGLvxkjNc9JOHyWaZ8zp8ao47/ixNqj38CU/Gv+xHuZn0tJvkR2mVl6gxj6Hbmuqm@postgresql.org X-Gm-Message-State: AOJu0YxxFoO3WkHH4DU2HNcza/AOnzk66qzlhIIjIFaA6SMrXGzShobO YZiNZ7kuoHxvswrIwmQ3N6tLMzwKYufMijSsjXBopfxgNAfNzFPVYvxXrkRnKCU= X-Gm-Gg: ASbGncvTmzfigJ7bVNPo/pkTuWi9HE5aalhPrFwEN8apUS1oPa7K6hrPKsvRhCl5ySu q0xWKkR+oi61k9RaJjiEJlLUZ9+kqAIC1fFVQVFtIEu7i8wzLV1ieWLr3TTMfrYxt/A6jMp+fBc OL6HhNDcFmxdOqYitRWwvD+IXCrXFEX1sPrvEVVwkxZ9AxBdsxaAD4Uy1wZoY73scpXHp6Q6Vl1 IgJUgPysrCoq0jUPdv913rEWTNjtCdXubDQBnDJwDSCL+GK16v0sDr0MXnu X-Google-Smtp-Source: AGHT+IHc0Q2zYbloyMBxIpgQH+S1BGoinBrRrCzYfuBwQHacAYBboRPrl54kJgX+QGAw/tKBEzeF2Q== X-Received: by 2002:a05:6000:4024:b0:382:51ae:7569 with SMTP id ffacd0b85a97d-38a872e164dmr7557519f8f.18.1736501508774; Fri, 10 Jan 2025 01:31:48 -0800 (PST) Received: from antos (109-81-174-36.rct.o2.cz. [109.81.174.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2ddd113sm82819825e9.25.2025.01.10.01.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 01:31:48 -0800 (PST) From: Antonin Houska To: Pavel Stehule cc: Alvaro Herrera , Junwang Zhao , Kirill Reshke , Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? In-reply-to: References: <47194.1733941797@antos> <202501091335.pn54a2ettbsi@alvherre.pgsql> Comments: In-reply-to Pavel Stehule message dated "Thu, 09 Jan 2025 18:08:39 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 10 Jan 2025 10:31:47 +0100 Message-ID: <2532.1736501507@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule wrote: > Hi >=20 > =C4=8Dt 9. 1. 2025 v 14:35 odes=C3=ADlatel Alvaro Herrera napsal: >=20 > On 2024-Dec-11, Antonin Houska wrote: >=20 > > Oh, it was too messy. I think I was thinking of too many things at onc= e (such > > as locking the old heap, the new heap and the new heap's TOAST). Also,= one > > thing that might have contributed to the confusion is that make_new_he= ap() has > > the 'lockmode' argument, which receives various values from various > > callers. However, both the new heap and its TOAST relation are eventua= lly > > created by heap_create_with_catalog(), and this function always leaves= the new > > relation locked in AccessExclusiveMode. Maybe this needs some refactor= ing. > >=20 > > Therefore I reverted the changes arount make_new_heap() and simply pas= s NoLock > > for lockmode in cluster.c >=20 > Cool, thanks, I have pushed this. I made some additional minor changes, > nothing earth-shattering. >=20 > Meanwhile the patch 0004 has some seemingly trivial conflicts. If you > want to rebase, I'd appreciate that. In the meantime I'll give a look > at the next two other API changes. >=20 > I'm not happy with the idea of having this new command be VACUUM (FULL > CONCURRENTLY). It's a bit of an absurd name if you ask me. Heck, even > VACUUM (FULL) seems a bit absurd nowadays. >=20 > Although it can sound absurd - it makes perfect sense for me - both "FULL= " and "CONCURRENTLY" are years used terms. >=20 > Maybe we can introduce a synonym like COMPACT for FULL.=20 Yes, at first glance, FULL might indicate to users that it processes the wh= ole table, however VACUUM does that regardless this option. COMPACT would be mo= re accurate because it would tell that, besides removing dead tuples, unused space is removed properly. However I'm not sure if the FULL option should have been added to VACUUM at all. Note that, internally, it uses completely different approach to the problem of garbage collection. As a consequence, there are several options which are not compatible with the FULL option: PARALLEL, DISABLE_PAGE_SKIPPING, BUFFER_USAGE_LIMIT, and maybe some more. Thus I understand Alvaro's objections against VACUUM (FULL, CONCURRENTLY). > I don't see a strong benefit for introducing a new command (with almost a= ll > identical functionality) just because the words sound strange. If we turn the FULL option into an alias for the new command, and remove th= at after "some time", then there is no identical functionality anymore. The new functionality overlaps with CLUSTER, except that it works CONCURRENTLY. However, invoking the new functionality via CLUSTER (CONCURRENTLY) is not a complete solution because it's also usable w/o ordering. That's why a new command makes sense to me. After all, the new code aims primarily at bloat removal rather than at ordering. Note that it only orders the existing rows, but does not even try= to order the rows inserted into the table while the data is being copied to the new file. Therefore I can imagine adding a new command that acts like VACUUM (FULL, CONCURRENTLY), but does not try to be CLUSTER (CONCURRENTL). --=20 Antonin Houska Web: https://www.cybertec-postgresql.com