The REPACK decoding worker doesn't pass BGWORKER_BYPASS_ALLOWCONN like
parallel.c does, so it can fail to start. Here is a reproducer:
CREATE DATABASE d;
REVOKE CONNECT ON DATABASE d FROM PUBLIC;
\c d
CREATE ROLE r NOLOGIN;
CREATE TABLE t (a INT PRIMARY KEY);
ALTER TABLE t OWNER TO r;
REPACK t; -- works
REPACK (CONCURRENTLY) t; -- fails
That last command produces the following output:
ERROR: permission denied for database "d"
DETAIL: User does not have CONNECT privilege.
CONTEXT: REPACK decoding worker
This one seems easy enough to fix.
--
nathan