Re: Do not lock tables in get_tables_to_repack

From: cca5507 <cca5507(at)qq(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Do not lock tables in get_tables_to_repack
Date: 2026-07-11 14:50:46
Message-ID: tencent_3188B53829333244786E072B7611A1F48508@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > Any opinions on this?
> >
> > I will take a closer look at this in a bit.
>
> Patch looks good to me. One nit:
>
> + table_oid = IndexGetRelation(child_oid, true);
> + if (!OidIsValid(table_oid))
> + continue;
>
> How about a short comment on why this is needed even with a lock on
> the parent, since that lock doesn't cover lower-level leaves in a
> multi-level partition tree?

I think it's worth a comment, too. Patch LGTM.

--
Regards,
ChangAo Chen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-07-11 14:52:05 Re: Update our timezone code to IANA tzcode2026b
Previous Message Peter Eisentraut 2026-07-11 14:38:47 Re: for loop variable fixes