Re: REPACK (CONCURRENTLY) rewrites tables marked with user_catalog_table - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: REPACK (CONCURRENTLY) rewrites tables marked with user_catalog_table
Date
Msg-id CALj2ACUQYFsv0HOqH2ZbBg_KG7yZvo+8nTg=tnvVqDhBxo9Ghg@mail.gmail.com
Whole thread
Responses Re: [PATCH] Refactor *_abbrev_convert() functions
List pgsql-hackers
Hi,

On Sat, Aug 29, 2026 at 4:23 AM Antonin Houska <ah@cybertec.at> wrote:
>
> Thanks! I'm just thinking about this comment:
>
> +       /* The CONCURRENTLY path does not write logical rewrite mappings. */
>
> IMO it makes no sense to rewrite the logical mappings as long as REPACK
> (CONCURRENTLY) changes visibility information (i.e. it's MVCC-unsafe). Once we
> implement the MVCC-safety, we should not remove this check unless we implement
> the rewriting of the mappings for user catalog tables - that might also be
> worth mentioning in the comment.
>
> So far, I'd consider the MVCC-unsafety the primary reason to prohibit REPACK
> (CONCURRENTLY) (or anyother MVCC-unsafe command) on the user catalog tables,
> because it can make the contents of those tables invisible to the output
> plugin at some point.

Thanks for pointing this out. I read the docs related to MVCC-safety
of concurrent repack. I reworded the comment as you suggested. Feel
free to suggest changes to it if any. Please find the attached v2
patch.

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

Attachment

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: REPACK ONLY is accepted but ignored
Next
From: Peter Geoghegan
Date:
Subject: Re: Randomize B-Tree page split location to avoid oscillating patterns