Re: REPACK: warn about skipping foreign partitions

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: REPACK: warn about skipping foreign partitions
Date: 2026-08-31 17:01:27
Message-ID: CALj2ACWbqC5crSu-JibEhChWTvYhk3Pe8X1COm1uwwOZfyWuhA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Sun, Aug 30, 2026 at 11:41 PM Antonin Houska <ah(at)cybertec(dot)at> wrote:
>
> Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>
> > Repack/cluster errors out when called directly on a foreign table. In
> > contrast to vacuum, repack/cluster doesn't warn when the table itself
> > is local but has foreign partitions.
> >
> > The attached patch adds a similar warning to these commands, making
> > this skip clearly visible to users.
>
> I don't object to the new warning, however this does not look like REPACK
> regression. AFAICS, CLUSTER in v18 behaves in the same way. Please add the
> patch to the next CF. Thanks.

Yes, silently skipping foreign partitions seems like an existing
behavior. If we want to fix this, IMHO, ensuring the behavior and the
code and warning message stay common across vacuum, vacuum full,
repack, concurrent repack, and cluster (both database-wide and with a
list of relations) makes sense. So attempting to fix it on HEAD seems
right to me.

I'm not sure if we need to explicitly mention in the docs that we emit
a warning. Specifying that we skip foreign partitions is fine.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2026-08-31 17:31:37 SUM(int2)/SUM(int4) do not detect overflow of the int8 accumulator
Previous Message Nathan Bossart 2026-08-31 16:47:56 Re: another autovacuum scheduling thread