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 1v2CI5-001Fyk-DA for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Sep 2025 17:31:29 +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 1v2CH5-004Uum-2m for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Sep 2025 17:30:27 +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 1v2CH4-004Uud-Mh for pgsql-hackers@lists.postgresql.org; Fri, 26 Sep 2025 17:30:27 +0000 Received: from mail-yx1-xb12f.google.com ([2607:f8b0:4864:20::b12f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v2CGz-0004A6-0R for pgsql-hackers@lists.postgresql.org; Fri, 26 Sep 2025 17:30:26 +0000 Received: by mail-yx1-xb12f.google.com with SMTP id 956f58d0204a3-6353ff1a78dso1704901d50.0 for ; Fri, 26 Sep 2025 10:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xzilla-net.20230601.gappssmtp.com; s=20230601; t=1758907821; x=1759512621; 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=vA93cbFlAE5hb5Oio8+T598XOceb/NeQpqujJIoeonQ=; b=ps+dAbC64of24ZbFImYO2ulVrDZrMbXITGq0YuTiCOr4erIK8S3DGa1DxyI7fa2N0n +rCLYUDGQ2w+JBqmwMAsmmCRq/01fF2nDXPBCH9hLM3o81CpLJG1JVO4uUjjneCtWnWx ZgJHyMszE9TEbTwSxQuknXIN7OVY6WAqYUZyJR0r4bl2LuFfQqawuu4b2Y5bVrgneFwQ HvZ6hHKzNyZZPugP+nN8U9ZXEng2gW+RiMalad1kLW1MyjgUJDmDCu8ELfKZM7K3CC7X rN0ToJn8xTcB/JA3bP5Gf9l3P1Qct3A7tAa2Zyakz7KS8PCpb65fDqSQa6Mi/A8UJ1nH mNOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758907821; x=1759512621; 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=vA93cbFlAE5hb5Oio8+T598XOceb/NeQpqujJIoeonQ=; b=Sq9IeoD5Q9yNWuC0adLTmwnHs1CZN7a9pNGMJpCp0cs55+j0+E3dyapM5Fj/kuGmow KbRdSBMu0xPvuB+UyKNNky6kd1QbnAP9FQd3nmScLC8+6bFBl5TDZcnl1QL2tvYtuEaI C7KXheDyeAK8ktlV5bYHor/FYlF+BTnKyseSdoxIZsr7apSQnpwz1Fqz/Is3dHIzhLB1 nimwcIWbihtnVMV2egxKpkf5mORgtOmnjj2NBDproVUrVKLVz3t6ECbk5VU5lc0tUe+S 4qY+S1SS1dCO5z7Ci5xLKCzrjT5LYfnC5jdK3vUcu/3sTv/5I7qgwfk+1/mh3SQC2TI/ gAZA== X-Gm-Message-State: AOJu0YwrHaDe9rpH31yqh2TDkyXsS3gTC0HMH8xg5nDf9ZSQ2DY6Asyk 0d4Ofh6bF+W22nOpM5EDV1O7RnbxpZlMI6NcgLLfIPr5Dh4qr5eL7o67JmQwo+Y0nbHWvI9gQy8 mu5THinFWflrphH/jYBQSqVsFLFrNO9rzP5tcclBbUQ== X-Gm-Gg: ASbGnculJnF4eGroEOCPkNwa5w7t7L1RXb68yL+RqL1Ds+KfiE+UPE4PGEE1BXwmBYc jQafwXdHG+lUIx5kbTG6ZcwyK80EthBLRoMTVTtnrM8srKRLcrsmas8TOKYHIUzC7oRQdMbPTf9 srPN0WuqmpdeBd4wwNpm/qGiC9A65mWNtemoe7UNK3f1sgzxwRk8+8yQ6b72i6Ty+b7oomHEA7A GBcSE4= X-Google-Smtp-Source: AGHT+IFOW3Fpma9i8cbKjtFonsAiowHtSbu2g10Pb3DqXWIx/9fQ5mSMwXBd2aDbkDrUqTP6BzgqEioIczM8hw8Ha3I= X-Received: by 2002:a05:690e:1516:b0:636:1b01:63df with SMTP id 956f58d0204a3-6361b016743mr7910590d50.14.1758907820914; Fri, 26 Sep 2025 10:30:20 -0700 (PDT) MIME-Version: 1.0 References: <202508301750.cbohxyy2pcce@alvherre.pgsql> <202509251758.t77p7r2ocmej@alvherre.pgsql> In-Reply-To: <202509251758.t77p7r2ocmej@alvherre.pgsql> From: Robert Treat Date: Fri, 26 Sep 2025 13:30:09 -0400 X-Gm-Features: AS18NWDGdCWrcBpvpm6klfvwfnWnz6HCX1z_B6B_yXs4LvUmx6rgTHX6cy9otu4 Message-ID: Subject: Re: Adding REPACK [concurrently] To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Pg Hackers , Antonin Houska , Fujii Masao , Mihail Nikalayeu 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 Thu, Sep 25, 2025 at 2:12=E2=80=AFPM =C3=81lvaro Herrera wrote: > So here's v22 with those and rebased to current sources. Only the first > two patches this time, which are the ones I would be glad to receive > input on. > A number of small issues I noticed. I don't know that they all need addressing right now, but seems worth asking the questions... #1 "pg_repackdb --help" does not mention the --index option, although the flag is accepted. I'm not sure if this is meant to match clusterdb, but since we need the index option to invoke the clustering behavior, I think it needs to be there. #2 [xzilla@zebes] pgsql/bin/pg_repackdb -d pagila -v -t customer --index=3Didx_last_name pg_repackdb: repacking database "pagila" INFO: clustering "public.customer" using sequential scan and sort [xzilla@zebes] pgsql/bin/pg_repackdb -d pagila -v -t customer pg_repackdb: repacking database "pagila" INFO: vacuuming "public.customer" This was less confusing once I figured out we could pass the --index option, but even with that it is a little confusing, I think mostly because it looks like we are "vacuuming" the table, which in a world of repack and vacuum (ie. no vacuum full) doesn't make sense. I think the right thing to do here would be to modify it to be "repacking %s" in both cases, with the "using sequential scan and sort" as the means to understand which version of repack is being executed. #3 pg_repackdb does not offer an --analyze option, which istm it should to match the REPACK command #4 SQL level REPACK help shows: where option can be one of: VERBOSE [ boolean ] ANALYSE | ANALYZE but SQL level VACUUM does VERBOSE [ boolean ] ANALYZE [ boolean ] These operate the same way, so I would expect it to match the language in vacuum. #5 [xzilla@zebes] pgsql/bin/pg_repackdb -d pagila -v -t film --index pg_repackdb: repacking database "pagila" In the above scenario, I am repacking without having previously specified an index. At the SQL level this would throw an error, at the command line it gives me a heart attack. :-) It's actually not that bad, because we don't actually do anything, but maybe we should throw an error? #6 On the individual command pages (like sql-repack.html), I think there should be more cross-linking, ie. repack should probably say "see also cluster" and vice versa. Likely similarly with vacuum and repack. #7 Is there some reason you chose to intermingle the repack regression tests with the existing tests? I feel like it'd be easier to differentiate potential regressions and new functionality if these were separated. Robert Treat https://xzilla.net