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 1rz0lj-001VU8-Bb for pgsql-general@arkaria.postgresql.org; Mon, 22 Apr 2024 21:00:07 +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 1rz0lh-00GV3w-67 for pgsql-general@arkaria.postgresql.org; Mon, 22 Apr 2024 21:00:05 +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 1rz0lg-00GV3n-OY for pgsql-general@lists.postgresql.org; Mon, 22 Apr 2024 21:00:04 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rz0la-00491d-5n for pgsql-general@postgresql.org; Mon, 22 Apr 2024 21:00:03 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-233f389a61eso2395469fac.3 for ; Mon, 22 Apr 2024 13:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713819597; x=1714424397; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=3nQC6/TiYZ/whIRvdIoiphkwCVjtmRISUKNLteBef3Y=; b=XIgLe3pJjTYaMMQS8rAz70IgK1bNP6r143qBecsihC50q9leDLU3O3yy2gGkZjYnKW hrUlr7b1wpBLUA8uiCW+nKUgle75z0cWzkQeVrNqagex5b0qwMzmefQlpv1ikD/myFI1 DKswTHd7mgDCYAPhDrcEzXPqhLLUlMfBULidbPmtCC/GxJpGxefxV6ARVV5HVuF1eDI/ 1vQbxKeHrvxcDaEXcvhr9IlvFQ4ppIHmepssQP58gdbt/8nl7mlQU7gXOFx/m+90RuQJ LDhx0z2Y6be695gjcYR0aWxBQQkCE9i+QtHbYIcLuUPdSt6iFfPABZ8c88z6TMByOtS6 sDPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713819597; x=1714424397; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3nQC6/TiYZ/whIRvdIoiphkwCVjtmRISUKNLteBef3Y=; b=TkfUPtldlpzYqzK5WoIa++/T84pjTlv5F+iUt24uzNrEMtRM9a5Ux+ux2nAtj2lJa1 no5rGf3fhPGxNyfVySrbjronxQfHZZSGYf3MHF1k1mWA2GviuqMMrRMdzlqoCY++C8W7 CzxET6aLiBLFjiqlS5GyRI6Uq/KVwtOrIQgydb6c4COjTjY1gRBqr9sUGNvk81lz9AxD 9wDagrHSXaKMSRk9ieLcxz/vVt3huZ+YiHFvQqyW0QjsMA4IFrm9O3DkBe54ljWVio5Z rb5ziRFwe0O1Mf2CRaQdS1w/WXpBfYAV610KmNVEnu/8ywRGOgQ9bsfZQuCi51cUnr7a OoEw== X-Gm-Message-State: AOJu0Yyb73BvDOUMUg6t1OBQPpm+YXf+nEbwm5UuZQKKj7zwwQyzDdmw OR3BXsOmog7sMdbw8Gwb6Uf9KaCFX46oVlX3OMAv3WxeG9uWHdKIwCBOXp90GWedfjkLmvbrR9F NxlK71sNk0rZgt7v8gqiX0yd5s8kCtA== X-Google-Smtp-Source: AGHT+IE1urYWNzTbNfN6pZIuFD6G6Pg9pHW5bFll/5vKZd2u+SUglZhWlw9dlK9Lop0r5vBHG8qm0VvtS3Zqjzy5XRc= X-Received: by 2002:a05:6870:e3d1:b0:22e:a78c:85ec with SMTP id y17-20020a056870e3d100b0022ea78c85ecmr13693015oad.38.1713819595660; Mon, 22 Apr 2024 13:59:55 -0700 (PDT) MIME-Version: 1.0 References: <2870091.1713739514@sss.pgh.pa.us> <3043219.1713795953@sss.pgh.pa.us> <632e3176-13e4-4863-b8b9-bc1aba778268@aklaver.com> <4e81951f-4666-400d-b836-a020e55e168a@aklaver.com> In-Reply-To: <4e81951f-4666-400d-b836-a020e55e168a@aklaver.com> From: Ron Johnson Date: Mon, 22 Apr 2024 16:59:44 -0400 Message-ID: Subject: Re: CLUSTER vs. VACUUM FULL To: pgsql-general Content-Type: multipart/alternative; boundary="0000000000003566380616b5b881" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003566380616b5b881 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 22, 2024 at 4:21=E2=80=AFPM Adrian Klaver wrote: [snip] > Which gets us back to your comment upstream: > > "What the VACUUM docs "should" do, it seems, is suggest CLUSTER on the > PK, if the PK is a sequence (whether that be an actual sequence, or a > timestamp or something else that grows monotonically)." > > This is a case specific to you and this particular circumstance, not a > general rule for VACUUM FULL. If for no other reason then it might make > more sense for the application that the CLUSTER be done on some other > index then the PK. > On Stack Exchange, I've got a question on how to determine when to run CLUSTER. It ties in strongly with this thread.. --0000000000003566380616b5b881 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 22, 2024 at 4:21=E2=80=AFPM A= drian Klaver <adrian.klaver= @aklaver.com> wrote:
[snip]= =C2=A0
Which gets us= back to your comment upstream:

"What the VACUUM docs "should" do, it seems, is suggest CLUS= TER on the
PK, if the PK is a sequence (whether that be an actual sequence, or a
timestamp or something else that grows monotonically)."

This is a case specific to you and this particular circumstance, not a
general rule for VACUUM FULL. If for no other reason then it might make more sense for the application that the CLUSTER be done on some other
index then the PK.

On Stack Exchange, I= 've got a question on how to determine when to run CLUSTER.=C2=A0 It ti= es in strongly with this thread..

--0000000000003566380616b5b881--