Re: Adding REPACK [concurrently]

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: 'Alvaro Herrera' <alvherre@alvh.no-ip.org>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: Mihail Nikalayeu <mihailnikalayeu@gmail.com>, Antonin Houska <ah@cybertec.at>, Srinath Reddy Sadipiralla <srinath2133@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>, Robert Treat <rob@xzilla.net>
Date: 2026-05-01T07:30:27Z
Lists: pgsql-hackers

Attachments

Hello,

On 2026-Apr-07, Hayato Kuroda (Fujitsu) wrote:

> 01.
> ```
> --- a/src/backend/access/index/genam.c
> +++ b/src/backend/access/index/genam.c
> @@ -394,6 +394,14 @@ systable_beginscan(Relation heapRelation,
>  	SysScanDesc sysscan;
>  	Relation	irel;
>  
> +	/*
> +	 * If this backend promised that it won't access shared catalogs during
> +	 * logical decoding, this it the right place to verify.
> +	 */
> +	Assert(!HistoricSnapshotActive() ||
> +		   accessSharedCatalogsInDecoding ||
> +		   !heapRelation->rd_rel->relisshared);
> ```
> 
> Not sure it's OK to use Assert(). elog(ERROR) might be better if we want to really
> avoid the case.

How about the attached?

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/