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.96) (envelope-from ) id 1vR9VN-007scZ-2l for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2025 13:36:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vR9VK-002l9J-2r for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Dec 2025 13:36:19 +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.96) (envelope-from ) id 1vR9VK-002l99-1o for pgsql-hackers@lists.postgresql.org; Thu, 04 Dec 2025 13:36:18 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vR9VH-0036tG-2N for pgsql-hackers@lists.postgresql.org; Thu, 04 Dec 2025 13:36:17 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-b79f8f7ea43so68298866b.2 for ; Thu, 04 Dec 2025 05:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1764855373; x=1765460173; darn=lists.postgresql.org; h=message-id:date:content-transfer-encoding:mime-version:comments :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZspgGiMeU2voaqP3bmoxXzkIRr4W2k1M21ic9XTLUEM=; b=kmB+3tI4aylWviaNtPdbA48ZfGew830yN6Z4FxUqFdOZFzQIhFdcZ4puEkeG9I3Vsb AY+3YrtndkUCr1VlGKAyO4AsamD85iy+tEiwfGsiGMObI5nthKK1MM908h+l57Y15cat ZhZmpXvG5OyIJsqRvy/uri4J0OBvsSKD8uZVKP9A8Eqs2lbCKWPhY5L0in8VzhyBB4Ap OYqpfeaNIMGd3ricHRV7MCkcMpK3UCGka4Gq8ONpZyF4TSAzX9DouXy60lNb9AWMz0Bc F6As6KWp17oRp0DHlGL/U9THSP9Ywu7T3bznKyspdYidKiBCE3UMmdGW0tIfDwao8yjD cq9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764855373; x=1765460173; h=message-id:date:content-transfer-encoding:mime-version:comments :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZspgGiMeU2voaqP3bmoxXzkIRr4W2k1M21ic9XTLUEM=; b=vH7AjpjfNtzLS0wb7oSHmoKqUBbS++h7BZCfC8kJzzZQ5hPCHWpBUJHR7u4NH9u8nr /Bij6gLFWW+TnNcPBI2eqQfXS73yxDwzpIJmw4XXccUddYBIsLDl4L3vgLbrYU290B2G D8HgO+vPFyUBzX5ufxRr4MDWMMWttKXXKow2HmQqZfEM5wvtwd7MX3oGrkCn8yXjqPnV il02bEe/EzPY82BUCBiR4shwtGgS7/MTq6d404ouFrJwMRDO4D/PNZo90xwwPcbFS3z/ BKwDqt/zvvVHCt0Lth5Pfcic7GPjodLrXV8jt/2sPwRCrPkKXsxivzXUpWMbrOBUWaN7 4KKw== X-Forwarded-Encrypted: i=1; AJvYcCWh+sbxO0FMdR0pbqsmMFa/socs1s/vBIuiUmDPbDNlu/0X3oUxF0xWizspoBpLY56Xx3hrBrzATHfPjkEA@lists.postgresql.org X-Gm-Message-State: AOJu0YzwVWSXxPMxkpXxw6EiaXOtq7sxdEcAG+zls3VjTff4lysQE8rx KKFXciBCUrFxJDhn0zHfF79YgQp9HjB22F1YeRdovsAhchutbIo5Et/kikojX/4qMr8= X-Gm-Gg: ASbGncva/0gJZHfu8jIooaA72/Kk3++JQY16zChprjtK2d36Ze/0o2lJKwZwVujMG/R 7ghc7x7x2tuwLTwpU28ZVDBxKLegWfBDaMeIMjimVXRf8Mj6DuSOaquoKpJKQKIg0FoPNWsfZye qOxCcoi2y1V+cqeEYcmb1L7pwPb0r2LLlpLiKGAjcOsqrVAtgH1/vajaZ2TK2H6hU+qY4qpM+yT sF/sfi5PM4B/PBt5L2+csP6V5zSZY+bzEaoIqgNRBhMkVABjPxljeDE9PlSUDsFRiJSpSsgxMMY cWfXKSuzLRbHUHcf8TyaWuPspPxA6KGVdeHHUX3Y+W/z4acRKgKRLWbG2FS119gauwAqWma0MFy z4qbY2GXyR0rOvGN9KYBb2UKlSBPTXDO8hED12O7P529De3queK1kMOWQM8R+BDU5C3iKR5c5oK 3gxuNk5lz0BHos7u4NK3990S2S X-Google-Smtp-Source: AGHT+IGbptODbIko5cVL37dYjRI5EvpuNf9p6GYfinWgXLj9/SQ80KQFhsiOgkIy/GKhFo1pKszTXQ== X-Received: by 2002:a17:907:1b0e:b0:b4b:dd7e:65f2 with SMTP id a640c23a62f3a-b79ec3eff2fmr349116266b.5.1764855373211; Thu, 04 Dec 2025 05:36:13 -0800 (PST) Received: from localhost (109-81-168-246.rct.o2.cz. [109.81.168.246]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b79f4498797sm135086866b.19.2025.12.04.05.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Dec 2025 05:36:12 -0800 (PST) From: Antonin Houska To: jian he cc: Alvaro Herrera , Pg Hackers , Mihail Nikalayeu , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: References: <202507262156.sb455angijk6@alvherre.pgsql> <202510301734.pj4uds3mqxx4@alvherre.pgsql> Comments: In-reply-to jian he message dated "Sat, 01 Nov 2025 20:42:47 +0800." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Dec 2025 14:36:12 +0100 Message-ID: <23631.1764855372@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk jian he wrote: > if (params.options & CLUOPT_ANALYZE) > ereport(ERROR, > errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > errmsg("cannot %s multiple tables", "REPACK (ANALYZE)")); > for this error case, adding a simple test case would be better? More options should probably be tested, currently we have only very basic regression test for pg_repackdb. TBD > + /* Do an analyze, if requested */ > + if (params->options & CLUOPT_ANALYZE) > + { > + VacuumParams vac_params =3D {0}; > + > + vac_params.options |=3D VACOPT_ANALYZE; > + if (params->options & CLUOPT_VERBOSE) > + vac_params.options |=3D VACOPT_VERBOSE; > + analyze_rel(RelationGetRelid(rel), NULL, vac_params, > + stmt->relation->va_cols, true, NULL); > + } >=20 > Looking at the comments in struct VacuumParams, some fields have nonzero = default > values =E2=80=94 for example, log_vacuum_min_duration. > Do we need to explicitly set these fields to their default values? > (see ExecVacuum) Perhaps, TBD. > repack.sgml can also add a > See Also > similar to analyze.sgml, vacuum.sgml ok, added this in v26 (to be posted today): See Also (Not added reference to VACUUM FULL and CLUSTER intentionally: whoever uses REPACK should not need them. > doc/src/sgml/ref/repack.sgml > synopsis section missing syntax: > REPACK USING INDEX ok, added in v26. > I am wondering, can we also support > REPACK opt_utility_option_list USING INDEX I agree, added that in v26 (Hopefully I haven't broken anything, the syntax= is not trival anymore.) > MATERIALIZED VIEW: > create materialized view a_________ as select * from t2; >=20 > repack (verbose); > INFO: repacking "public.a_________" in physical order > INFO: "public.a_________": found 0 removable, 10 nonremovable row > versions in 1 pages > DETAIL: 0 dead row versions cannot be removed yet. > CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s. >=20 > cluster (verbose); > won't touch materialized view a_________ >=20 > but materialized views don't have bloat, nothing can be removed. > So here we are waste cycles to repack materialized view? Answered in https://www.postgresql.org/message-id/3436011762001613%40a7af84= 71-b1b8-48c2-9ff7-631187067407 --=20 Antonin Houska Web: https://www.cybertec-postgresql.com