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 1tY6XX-003ixI-Pi for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2025 16:46:48 +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 1tY6WW-00E1Wy-Sc for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2025 16:45:45 +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 1tY6WW-00E1Wp-Bg for pgsql-hackers@lists.postgresql.org; Wed, 15 Jan 2025 16:45:45 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tY6WT-000a3g-1g for pgsql-hackers@postgresql.org; Wed, 15 Jan 2025 16:45:43 +0000 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-46783d44db0so67695171cf.1 for ; Wed, 15 Jan 2025 08:45:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1736959539; x=1737564339; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=zzhr7+RVpoMiHTVLN+Ifvqblq8K136d/omoayhJJKDE=; b=vIOpzb/CMcasMaS5o84wRmJlCBFmW2uLYgq0ioo41jMET+MBsuJIIz+FKAwWHXRV4U 8CTVIDSv9u/af4UruuY/NnjiIUGi2PMR0vFt9Au8Cp88X5fQWcwcnrD2XhDZm/6LVrgn vajlqD8PKZa6SQ3TnGzityeoyJQKkMBsB+jqHqhlqHzrvtNV656XV/nMzHccCj9ySr+G fGDgBgTULPm0O0yD/fqTAyer9vhEQVMRlhfrUhXYV33jPsRCZQktBGqGBIL5KvqM37mX uAL4c5p3iucp6kJCrbaA0HIJDhgaOkh0Geadr+/5FSqa/05Gpq3mm1r30JGEhKpQ65aR hxNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736959539; x=1737564339; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zzhr7+RVpoMiHTVLN+Ifvqblq8K136d/omoayhJJKDE=; b=f+neaPhf3MEIHmKBSIzDhPEc1yZ3EZ7PeAahPPFN6kHq+YbeJ5LgIore1+LKAnKr66 ZoKaGSy0WfVPvMPVHKwf6JVsBpoR5CfFMEHwPzSIHeai0TYz5bzheqbje2fQ2ey2emMM ZFERobq6BcE+z6K7mafYC1LwAKuXARWgftwGlI6Q7xlzu23RdwbSNgF5RuFSCw63mxUk P0zpT2AS2or0UlWFH9Fg3zDxIMHU/49hhLFI09bBbzxyMyB0dQ1Ks9WWqmo7KHtQzYcE 8IvK3GxLkozhqd2Lq2FUPzbgdE1MqKW6Ejkf3on8w1bTU/74ceMPTTO8SiziYTNraQDt H0yg== X-Forwarded-Encrypted: i=1; AJvYcCWfnSk9BJRCAgmTUrWvRIFdQdYql+86077h6zYYsAXFdrLJmdIo8K0oxYC9IibCFyecfcaIgb23M9teFl/3@postgresql.org X-Gm-Message-State: AOJu0Ywwo7VVWiiOQIdAVxrI5bcRjnri//08Rp3s+DNfOLZZPGWjXOK6 5esyfV0D3pk8fpZec95Zfe4yT0XritvkOLXC0jDRVsCEjtMzcmbhVOr7G0ivhJE= X-Gm-Gg: ASbGncsddKlZqlYqYbAiAOqRp8L+1jJWEWB7wQSDARwO7bekstZIn4673OTDI1WjV0f STFx9xuUQO1TYwd6sWg2KLE7RcaPlQwzYcfk8QkT93ODFMP2N+pL4qTleA/lVM+WB5K+y21yGvK rISvo1SwAUbKc4OGMwHoGxKnR+21g8nBgGI26GrM00AhA4gCIImLN7RCrt3Qgne75RYt8aFjYWd nztbMwaHhvuwIyL60glvSdmFMYyA1B2O8TMcRw4s2E70gkiZjUAVhkjDxAvcfKnDYs= X-Google-Smtp-Source: AGHT+IH5W+gl8IJ5lfOFmHW7/gh1leaGWZYchFKalvnJuZ2ZkobMuU7R1fpng2QIMBYII8IJk0i5OA== X-Received: by 2002:ac8:7f4f:0:b0:466:acd2:1134 with SMTP id d75a77b69052e-46c7109f2a6mr475208421cf.52.1736959538792; Wed, 15 Jan 2025 08:45:38 -0800 (PST) Received: from ?IPV6:2605:a601:a681:6b00::1cc? ([2605:a601:a681:6b00::1cc]) by smtp.googlemail.com with ESMTPSA id d75a77b69052e-46c87340bafsm65881341cf.32.2025.01.15.08.45.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2025 08:45:38 -0800 (PST) Message-ID: <2b9214fe-21ea-4694-8cb7-e47774e1962d@dunslane.net> Date: Wed, 15 Jan 2025 11:45:32 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: why there is not VACUUM FULL CONCURRENTLY? To: Robert Treat , Michael Banck Cc: Alvaro Herrera , Antonin Houska , Junwang Zhao , Kirill Reshke , Pavel Stehule , Michael Paquier , PostgreSQL Hackers References: <202501091335.pn54a2ettbsi@alvherre.pgsql> <67851b65.170a0220.2f4d00.41de@mx.google.com> From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andrew@dunslane.net; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwG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bsFgelWnbPWAvXY+pD0dXOFRkagGmC/viwBDqq5b 5tk76kKmUbZxABEBAAHCwHwEGAEIACYCGwwWIQTkPlhGHfx8v0RpFaWZ+n/LWfw7gQUCZFlx 5wUJGVGAjgAKCRCZ+n/LWfw7gf+iB/4g8CPY5jihf5r/8EsoIGe2H+dpVmpPF8YGBzTIvCz/ fQoOq8AX/pE76QEuFnFZWfjw+wgBXgCVmkox2Eflkk6z4ND3pcwGZ6CfCxTQCDk/dij+2DQ4 6bmDCy/sBgcbz9mTpoLC11HLoPae6YN9nBNQRZDcEFEu54OaVOqlIdbA6m+POIBCXZdHOFc0 WoDTgxHRzC1jgQNidyd6tKqcsVJs0dzF0oKTmFFmUAqTdJO12LBuNA1rlqrR3EtpYk8B/wtS 5dIMD7Q8hwQpL+4C6GNpb6ZKnPkLi47pDOLhz2qBrqN+rqUEsT3YnExYpzj5yOBi+FlmV1Hw 49QYe1sn2ZPs In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-01-15 We 11:13 AM, Robert Treat wrote: > On Mon, Jan 13, 2025 at 8:56 AM Michael Banck wrote: >> Hi, >> On Sat, Jan 11, 2025 at 09:01:54AM -0500, Andrew Dunstan wrote: >>> On 2025-01-09 Th 8:35 AM, Alvaro Herrera wrote: >>>> 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 don't like any of them a lot :-/ >> > Agreed, though I do believe there would be a positive gain from > eliminating the overloaded CLUSTER term. > >>> COMPACT tablename ... >> That sounds like it would compress content rather than just rewrite it >> normally to get rid of bloat. >> >> I think REORG (or REPACK, but that has not history elsewhere) would fit >> best, we don't need to emulate the myriad of DB2 options... >> > I would like REPACK if I didn't believe it would lead to confusion > with pg_repack (which, afaict, seems to have better performance > characteristics, so will probably hang around). > > Actually, I wonder if we are too focused on the idea this is a > vaccum/bloat related tool. The original idea behind CLUSTER was not > related to vacuum or bloat management, but performance. There are > other reasons to want to rewrite a table as well (think dropped > columns or new column defaults). Is ALTER TABLE
REWRITE an > option? Current needed options would be for clustering or running > concurrently, but even without those options sometimes you just want > to rewrite the table, and this is probably the most straightforward > than making something up. > > I really don't like any of the ALTER TABLE variants, because that's about changing the table's definition, and this operation doesn't do that. I could live with REORG as a top level verb if you don't like COMPACT. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com