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 1unHAl-004vjp-EL for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Aug 2025 13:42:16 +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 1unHAj-005cdv-HK for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Aug 2025 13:42:14 +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 1unHAj-005cdn-49 for pgsql-hackers@lists.postgresql.org; Sat, 16 Aug 2025 13:42:13 +0000 Received: from mail-ua1-x92c.google.com ([2607:f8b0:4864:20::92c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1unHAg-000AhP-2V for pgsql-hackers@lists.postgresql.org; Sat, 16 Aug 2025 13:42:13 +0000 Received: by mail-ua1-x92c.google.com with SMTP id a1e0cc1a2514c-8900fcc0330so2248068241.0 for ; Sat, 16 Aug 2025 06:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xzilla-net.20230601.gappssmtp.com; s=20230601; t=1755351728; x=1755956528; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XRI8B/uL/bOC5o1EfvjZpWBmXX0lP5YqPIRQQN3jkM8=; b=goIhGFG+VQs5/e/OcbPmyCpqJCL/E6r52exdDzuQkMkyqG5+tvyF+NM6zRghW22+0P fI8QB5GTRljgRCOin0UzP9hQTmlvRRuCpYN1JiFpD1jl9xI7CUQyvLwC+9uOATwkBvGk YzhjxdZyOg/y7H4mqE86Wcp+I/S7WmuQ9+rLCemzR6RnpYr1iosJgiHVmxAVulx+vDm7 uAPL3DlKfDHVKnMRcLWkcc9YHcb24m1hAZ/f8smAIJ8K3arkbSfQ0uEjITC87FpLwE/j ovjAKiJ0xOl9flG8DFnDXeKbjxJBrfxil8PkxCe7SeDogH1AhLkzoiM+SdDfcde3m2/D d8rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755351728; x=1755956528; h=content-transfer-encoding:cc: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=XRI8B/uL/bOC5o1EfvjZpWBmXX0lP5YqPIRQQN3jkM8=; b=uWBZkOviN9yh7IpHyygbY+Ty7zZw9FMO4fs9RJX9T15VhzCUzBeS79npevGsPCu0Yy tqXvfaQG8W/wijzvjEZAM5MjKTbgzkWTV+CcxzMSvSOebtbjRkzGyE5GNjOIP62RebYX /eIVTWE83IVCMoV5qN/EwX7z+kQWRqGFgomUBvDuUcEiz7pNB0ZlFQZYcPWYViEBThFh ShMr7EITXnnT2xMWl++LWVXHJwnYpsMFIrSbvhi9bvq+xGpIfRHSWlHvKSICVqcfafFo QFZF5ESTnXEHWTS4laRjNs4IeBgHGarJ2o1/bGSkFxInGjNscXbIgC/Ffvy1YP5jSCwz PMWQ== X-Forwarded-Encrypted: i=1; AJvYcCUtlGKsG5oWC1TUZvG4Uwnto4esdylgTGwdvK0EcrBjWqsLa03fPggxsE9LGDWp0Mk5Iq5xQBTkPjm5CCOd@lists.postgresql.org X-Gm-Message-State: AOJu0Yyh8iVrLszhWQrgyMVuUm0Tc4a+MxMIpS5t9IO7BpRgI0vAwP2R NzwUgS7Tklzb6g+iktxC1OaRDLFI5EWDZ4/nMWZD0A3OuavdYLqrGRqcX/GCExBmyfYTPLcCNCi ste/6h4VNsQMRdzx0Ne1TrAp1KZfv/kLZRM4k5GWoQvDxzyiOnsZJR7o= X-Gm-Gg: ASbGncvKL7UYrmzYl6BA3evRBp9xmwEJnhLegZuVmt5QnlaO2/PI3NktmiHlVICVBiD aBpGh/LQJxasx3xDEU9FcNWi8NRkLaA10/yP84OyZKc5q+CT60oXhQTwE+L9gpUm2M8ZcAOXx2S T3lTd4v/F//UcjfYH6N62BQGFlgBuwZxo8Kd4+C8q0fKb4cVIXkd+Q37OyPgmwZ/a1jrnmezWnD 2d45Ow= X-Google-Smtp-Source: AGHT+IGWFH0QzqP/F2R2cCECyU5crAkmNRExyB+yOlfhpZaPeOz0bVtmVdcNPpJmm48qaQuRAd7MnPswdXVcEui8cUY= X-Received: by 2002:a05:6102:649a:10b0:508:171d:5874 with SMTP id ada2fe7eead31-5104074fbdfmr3008094137.5.1755351728557; Sat, 16 Aug 2025 06:42:08 -0700 (PDT) MIME-Version: 1.0 References: <202507262156.sb455angijk6@alvherre.pgsql> <11036.1754384324@localhost> In-Reply-To: <11036.1754384324@localhost> From: Robert Treat Date: Sat, 16 Aug 2025 09:41:57 -0400 X-Gm-Features: Ac12FXzdCc1CSGpZMWk3EiVu0mK7DOtCasOKHC2gVIES6mmM6e76EYFM7wAYIfc Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Pg Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 5, 2025 at 4:59=E2=80=AFAM Antonin Houska wrot= e: > > Alvaro Herrera wrote: > > > I made a few changes from Antonin's original at [2]. First, I modified > > the grammar to support "REPACK [tab] USING INDEX" without specifying th= e > > index name. With this change, all possibilities of the old commands ar= e > > covered, > > ... > > > Here's a list of existing commands, and how to write them in the curren= t > > patch's proposal for REPACK: > > > > -- re-clusters all tables that have a clustered index set > > CLUSTER -> REPACK USING INDEX > > > > -- clusters the given table using the given index > > CLUSTER tab USING idx -> REPACK tab USING INDEX idx > > > > -- clusters this table using a clustered index; error if no index clust= ered > > CLUSTER tab -> REPACK tab USING INDEX > > In the v18 patch, the docs say that repack doesn't remember the index, but it seems we are still calling mark_index_clustered, so I think the above is true but we need to update the docs(?). > > -- vacuum-full all tables > > VACUUM FULL -> REPACK > > > > -- vacuum-full the specified table > > VACUUM FULL tab -> REPACK tab > > > > Now that we want to cover the CLUSTER/VACUUM FULL completely, I've checke= d the > options of VACUUM FULL. I found two items not supported by REPACK (but al= so > not supported by by CLUSTER): ANALYZE and SKIP_DATABASE_STATS. Maybe just > let's mention that in the user documentation of REPACK? > I would note that both pg_repack and pg_squeeze analyze by default, and running "vacuum full analyze" is the recommended behavior, so not having analyze included is a step backwards. > (Besides that, VACUUM FULL accepts TRUNCATE and INDEX_CLEANUP options, bu= t I > think these have no effect.) > Yeah, these seem safe to ignore. Robert Treat https://xzilla.net