From: ritojoao (@ritojoao) <noreply+ritojoao@github.com>
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
Subject: Re: [reorg/pg_repack] PR #493: Use format() and pg_catalog-qualified catalog tables in pg_repack.sql.in
Date: Thu, 12 Nov 2026 12:51:12 +0000
Message-ID: <gh-reorg-pg_repack-493-c6824098841@github.com> (raw)
In-Reply-To: <gh-reorg-pg_repack-493@github.com>
References: <gh-reorg-pg_repack-493@github.com>
Thank you, @za-arthur, for the context and for the links.
You are right that the client sets `search_path = pg_catalog, pg_temp, public` on its connection, and in my test that covered case B. The one case where it did not help is setup C from my previous comment: the fake `public.format()` exists before `CREATE EXTENSION pg_repack`. The view `repack.tables` binds `format()` when the extension is created, so the client's search_path at run time does not change it. In that run the real `pg_repack` client sent the fake SQL, the lock step failed with a warning, and the run still ended with exit code 0 (`format-client-after.log`). With the third commit it did not. The commit only qualifies the functions; operators in the view are still resolved by search_path. I only tested this on PG18 with a simple table, so please treat it as one data point.
I also see that #482 changes `lib/pg_repack.sql.in` too. I am happy to follow what the maintainers prefer: keep the PR as it is, drop only the third commit, or rebase it on top of #482 after that one is merged, so the two do not conflict.