If one has indexes with operators/functions delivered by extensions, that typically land into public schema, such indexes will cause pg_repack to fail when parallel processing is used (-j switch).
The reason is — initially, all processes do SET search_path TO pg_catalog, pg_temp.
Later, main process will adjust it's config SET search_path = pg_catalog, pg_temp, public, but parallel workers will not do so. Obviously, this causes errors, like this:
LINE 1: ...870943 ON repack.table_870934 USING btree (((data -> 'val'::...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Reproducer:
CREATE DATABASE repack;
\c repack
CREATE EXTENSION hstore;
CREATE EXTENSION pg_repack;
CREATE TABLE repack (id serial PRIMARY KEY, data hstore);
CREATE INDEX i_repack_data_val ON repack ((data -> 'val'::text));
\q
pg_repack -t repack -j 2 repack
If one has indexes with operators/functions delivered by extensions, that typically land into
public
schema, such indexes will causepg_repack
to fail when parallel processing is used (-j
switch).The reason is — initially, all processes do
SET search_path TO pg_catalog, pg_temp
. Later, main process will adjust it's configSET search_path = pg_catalog, pg_temp, public
, but parallel workers will not do so. Obviously, this causes errors, like this:Reproducer: