| From: | Alvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
| Cc: | Antonin Houska <ah(at)cybertec(dot)at>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, "n(dot)kalinin(at)postgrespro(dot)ru" <n(dot)kalinin(at)postgrespro(dot)ru>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API |
| Date: | 2026-06-08 19:50:16 |
| Message-ID: | aicUE9JzOQCp1lLE@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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/
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Disallow-direct-use-of-the-pgrepack-plugin.patch | text/x-diff | 9.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-06-08 23:44:50 | Re: BUG #19508: pg_buffercache_pages() crashes the backend with an incompatible caller-supplied record definition |
| Previous Message | Álvaro Herrera | 2026-06-08 18:40:20 | Re: BUG #19491: Segmentation fault triggered by IS NULL |