repack with verbose output: not showing the number of removable row versions when using USING INDEX or CONCURRENTLY option

From: Jochen Bandhauer <jb(at)jbitc(dot)de>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: repack with verbose output: not showing the number of removable row versions when using USING INDEX or CONCURRENTLY option
Date: 2026-08-19 11:03:27
Message-ID: 5b73fd85-3066-4e41-b306-bfa8f893a239@jbitc.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

on: PostgreSQL 19beta3 (development build (./configure --enable-debug
--enable-cassert CFLAGS='-O0 -g3'))
when using repack with the option CONCURRENTLY or when using USING INDEX
the verbose output does not show the number of removable row versions.
When using the command without these options the number of removable
rows are shown.

Complete Version: PostgreSQL 19beta3 on x86_64-pc-linux-gnu, compiled by
gcc (GCC) 14.3.1 20251022 (Red Hat 14.3.1-4), 64-bit

Test Case:

-- create table and data
drop table if exists t;
create table t (id bigint primary key, col1 bigint);
create index i1 on t (col1);
insert into t select generate_series(1, 100000);

-- commands
repack (verbose) t;  -- found 0 removable => ok
update t set col1=1;
repack (verbose) t;  -- found 100000 removable => ok
update t set col1=1;
repack (verbose,concurrently) t;  -- found 0 removable => is this correct?
update t set col1=1;
repack (verbose) t using index i1;  -- found 0 removable => is this correct?
update t set col1=1;
repack (verbose,concurrently) t using index i1;  -- found 0 removable =>
is this correct?

-- output:
mydb=# repack (verbose) t;
INFO:  repacking "public.t" in physical order
INFO:  "public.t": found 0 removable, 100000 nonremovable row versions
in 443 pages
DETAIL:  0 dead row versions cannot be removed yet.
CPU: user: 0.14 s, system: 0.00 s, elapsed: 0.14 s.
REPACK
mydb=# update t set col1=1;
UPDATE 100000
mydb=# repack (verbose) t;
INFO:  repacking "public.t" in physical order
INFO:  "public.t": found 100000 removable, 100000 nonremovable row
versions in 984 pages
DETAIL:  0 dead row versions cannot be removed yet.
CPU: user: 0.23 s, system: 0.00 s, elapsed: 0.23 s.
REPACK
mydb=# update t set col1=1;
UPDATE 100000
mydb=# repack (verbose,concurrently) t;
INFO:  repacking "public.t" in physical order
INFO:  "public.t": found 0 removable, 100000 nonremovable row versions
in 1082 pages
DETAIL:  0 dead row versions cannot be removed yet.
CPU: user: 0.37 s, system: 0.00 s, elapsed: 0.38 s.
REPACK
mydb=# update t set col1=1;
UPDATE 100000
mydb=# repack (verbose) t using index i1;
INFO:  repacking "public.t" using index scan on "i1"
INFO:  "public.t": found 0 removable, 100000 nonremovable row versions
in 1082 pages
DETAIL:  0 dead row versions cannot be removed yet.
CPU: user: 0.39 s, system: 0.00 s, elapsed: 0.40 s.
REPACK
mydb=# update t set col1=1;
UPDATE 100000
mydb=# repack (verbose,concurrently) t using index i1;
INFO:  repacking "public.t" using index scan on "i1"
INFO:  "public.t": found 0 removable, 100000 nonremovable row versions
in 1082 pages
DETAIL:  0 dead row versions cannot be removed yet.
CPU: user: 0.56 s, system: 0.01 s, elapsed: 0.59 s.
REPACK
mydb=#

Thanks
Jochen

--
Mit freundlichen Grüßen

Jochen Bandhauer
+49 (0)176 29390012
www.jbitc.de

Attachment Content-Type Size
jb.vcf text/vcard 202 bytes

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zsolt Parragi 2026-08-19 11:11:47 Re: BUG #19630: FOR PORTION OF crashes with XX000 when target range is NULL
Previous Message Zsolt Parragi 2026-08-19 10:56:19 Re: BUG #19632: RULE rewriting crashes with XX000 when RETURNING old/new references a system column