| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | Zhijie Hou <houzhijie22(at)gmail(dot)com>, "brar(at)gmx(dot)de" <brar(at)gmx(dot)de>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: BUG #19795: pgoutput: walsender crashes on START_REPLICATION option without a value |
| Date: | 2026-10-27 17:36:39 |
| Message-ID: | CALdSSPgUUY0B5dVWomzZRGvkvHqyyyF8xdAm=0N+RizPuSWZkQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Mon, 26 Oct 2026 at 07:56, Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Hi,
>
> > Attached is a patch that uses defGetString() for "proto_version" and
> > "publication_names" and adds a simple test in 030_pg_recvlogical.pl
> > to confirm it works.
>
> Thanks for the patch. One question:
>
> ```
> if (parsed > PG_UINT32_MAX)
> ereport(ERROR,
> (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> errmsg("proto_version \"%s\" out of range",
> strVal(defel->arg))));
> ```
>
> Here strVal() is still used, but I feel it's better to refer `val` here. We can completely remove
> the function call.
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
Hi!
Looks like a real issue. I reviewed a patch, I think this is a natural
follow-up for [0]. the CREATE_REPLICATION_SLOT/ALTER_REPLICATION_SLOT
option parser only uses defGetString/defGetBoolean - pgoutput is the
only crasher.
Also, should we reject option like
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("option \"%s\" requires a value",
"publication_names")));
instead of a generic error message from defGetString?
[0] https://github.com/postgres/postgres/commit/290bb8afe6b
--
Best regards,
Kirill Reshke
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | solai v | 2026-10-27 09:30:19 | Re: BUG #19767: pg_get_viewdef prints ORDER BY (- '3'::int4) as (- 3), which reparses as column position -3 |