| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add a hook for handling logical decoding messages on subscribers. |
| Date: | 2026-09-21 06:54:31 |
| Message-ID: | CAA4eK1Jd7ZRi7Nx3xkrAE=qjn4cRHF893zw7AaQ5KLYJBSSKiQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Sep 21, 2026 at 11:53 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Sep 18, 2026 at 6:13 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > Thanks for reviewing the patch!
> >
> > While I also think the patch is in good shape, I'd like to raise a
> > security risk this feature might introduce, particularly around
> > pg_logical_emit_message():
> >
>
> Review comments:
> ===============
>
One more comment:
+static void
+apply_handle_message(StringInfo s)
+{
+ LogicalRepMessageData msg;
+
+ /* Tablesync worker should never receive MESSAGE */
+ if (am_tablesync_worker())
+ ereport(ERROR,
+ errcode(ERRCODE_PROTOCOL_VIOLATION),
+ errmsg_internal("tablesync worker received a MESSAGE message"));
I think we should have a similar ERROR for parallel apply worker. I
don't think this message can reach there but we should protect it like
above.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-09-21 06:56:16 | Re: pg_walinspect: fix LSN validation messages and empty range handling |
| Previous Message | Palak Chaturvedi | 2026-09-21 06:50:37 | Re: Make pg_prewarm, autoprewarm yield for waiting DDL |