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 1tVwIP-00CoCu-GT for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 17:26:14 +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 1tVwIO-005Fr7-Cb for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 17:26:12 +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 1tVwIO-005Fql-1y for pgsql-hackers@lists.postgresql.org; Thu, 09 Jan 2025 17:26:11 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tVwII-000k54-1v for pgsql-hackers@postgresql.org; Thu, 09 Jan 2025 17:26:10 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-385e06af753so643800f8f.2 for ; Thu, 09 Jan 2025 09:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1736443564; x=1737048364; darn=postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=InKIwV408O3ZwCO+K+P0fW5b5/ScvlYJF619mg3IzPU=; b=FyvuTBCfAW7Y1cb369UKnRJyU0k81VE1m9Q5aQdv6ISw5xw1hTk/3UqaeI63fUvsUE 5W+YnnHM3uizEy1CN/iInqXXiZC95idXPw3rMwFfSpyKnFKWjXcriFKB+vrM0QLXFovF YVxMfBcP29prYoEgREPR7bV3DPOSgAz159J2jViOEHxGjArZvUvr7woNH/rMFpqdgghu 4IvtOl8iAcqghuL2qqdicLd1ZmnRyc6oWaavwnjYokf4SR8r6kRh8ysz8mlmfcLmJqnB 8ekGsQ14D0UxtyOlgyJeTvOTp30BU+79rbvaWDh9L2N2TGDluS2yzayGyGDlnRujcLR7 YBLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736443564; x=1737048364; h=message-id:date:content-transfer-encoding:content-id: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=InKIwV408O3ZwCO+K+P0fW5b5/ScvlYJF619mg3IzPU=; b=DfPUCzF5GQrGJFQGrSR8khljp4DpczpQfiyH4y9IatVpeKJ9op2KWpMGa07/+Vg7Ci LmnGtboxg//at4ApvGfq7sNOEr2AzWWHuMA8YL2RN7zCbawxwplYobCsg+0NyNXMxSPd V4YBOU2LcmVXrUBKciWu8W79KYoVoCFwZsRCVaQPT6nQq3FW0sARt/+wy9Fbi1DDvtQT ZQemoQzIzFy5esnW5X4dLZeh9NMVVelbGjMlnkt0gxx5iI4IYYiDa4TNdS/8qMN5ommO K8cK2isp+jTq7BR01Ble55w4vgimywWdsWAV1fF9ugj9YXbMPzBUpyfIAokhE6QYOMOl lfZg== X-Forwarded-Encrypted: i=1; AJvYcCVpq09BQ+qzamVKrp+OIYRD8RUuwkzP13RD3WsyLysajOMK3MUvL/ftUYn4WQlDRa7UXDDDo+AdnWgd0EZI@postgresql.org X-Gm-Message-State: AOJu0Yx4fqPX5r7QQ4AlVBMAgjGDBhnc4z+wOwG2YEvHdMIkMZIe5XSJ CxPNp9Dl55l+3zdixHsO9HcJsbVCvGt6tSVANxMzFZrlkOzokaabF3DdukajS88= X-Gm-Gg: ASbGncvf4eBNvcsZ7PVBq8G2xJFZtNzXQYXkqdgY2tmXLMnT9jw0Qu6yoP0ZJ33AkUM Lys7gOjGr2yIzg9pC+b84zoaMPVYKky4Y/8vOK3beqakNK0554s5ltLAcakuZw0gxpg6N/wTEfd e7kDKq/zXxc2Z80duPsLbskS5MAqt8RFornSDpYHaKWuxB++WvkDRGPkl7ZGAujgMNOb+8DVW6h EpxbzZSDfYiAEsrMiWBHy8WFV+9sjGp3kQS9H5SnW3TZEu97dVd/NUIkeje X-Google-Smtp-Source: AGHT+IGtsdMzU4civp3iItMrMtEZW2ctxVBxGNciu8SNQ1OlO/7/68enpYj83zZKLeM0rfIlJtKHZg== X-Received: by 2002:a05:6000:709:b0:38a:41c9:8544 with SMTP id ffacd0b85a97d-38a87336a6amr6695214f8f.37.1736443564048; Thu, 09 Jan 2025 09:26:04 -0800 (PST) Received: from antos (109-81-174-36.rct.o2.cz. [109.81.174.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38378csm2339480f8f.25.2025.01.09.09.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 09:26:03 -0800 (PST) From: Antonin Houska To: Alvaro Herrera cc: Junwang Zhao , Kirill Reshke , Pavel Stehule , Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? In-reply-to: <202501091335.pn54a2ettbsi@alvherre.pgsql> References: <202501091335.pn54a2ettbsi@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 09 Jan 2025 14:35:42 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10816.1736443562.1@antos> Content-Transfer-Encoding: quoted-printable Date: Thu, 09 Jan 2025 18:26:02 +0100 Message-ID: <10818.1736443562@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera wrote: > On 2024-Dec-11, Antonin Houska wrote: > = > > 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. > > = > > Therefore I reverted the changes arount make_new_heap() and simply pas= s NoLock > > for lockmode in cluster.c > = > Cool, thanks, I have pushed this. I made some additional minor changes, > nothing earth-shattering. It seems you accidentally fixed another problem :-) I was referring to the 'lockmode' argument of make_new_heap(). I can try to write a patch for tha= t but ... > 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. ... I can apply v06 even though I do have the commit ebd8fc7e47 in my work= ing tree. (And the CF bot does not complain (yet?).) Have you removed the 'lockmode' argument also from make_new_heap() and forgot to push it? This change would probably cause a conflict with v06. > 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. > = > Maybe we should have a new toplevel command. Some ideas that have been > thrown around: > = > - RETABLE (it's like REINDEX, but for tables) > - ALTER TABLE SQUEEZE > - SQUEEZE > - VACUUM (SQUEEZE) > - VACUUM (COMPACT) > - MAINTAIN COMPACT > - MAINTAIN SQUEEZE I recall that DB2 has REORG command, which also can do clustering [1] Regardless the name of the new command, should that also handle the non-concurrent cases? In that case we'd probably need to mark CLUSTER and VACUUM (FULL) as deprecated. [1] https://www.ibm.com/docs/en/db2/12.1?topic=3Dcommands-reorg-table -- = Antonin Houska Web: https://www.cybertec-postgresql.com