On 2026-Jun-05, Zhijie Hou (Fujitsu) wrote:
> I have no objection to the proposed approach. But I would like to confirm
> whether reporting an ERROR in the startup callback (when the context is not a
> REPACK decoding worker) is considered acceptable.
>
> Like:
>
> repack_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
> bool is_init)
> ...
> if (!AmRepackWorker())
> ereport(ERROR,
> errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> errmsg("this plugin can only be used by REPACK (CONCURRENTLY)"));
Hmm, yeah, that works for me, we can ditch the magic number then. I'm
considering something like the attached. I added the test case and
edited nearby comments. Will stare some more at it tomorrow ...
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/