Re: Incorrect CONTEXT reported for errors from parallel apply worker in logical replication

From: Zhijie Hou <houzhijie22(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Incorrect CONTEXT reported for errors from parallel apply worker in logical replication
Date: 2026-11-10 05:13:13
Message-ID: 4c0bf798-2dc3-4363-8cac-fbbb30132df1@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Nov10, 2026 at 01:35 AM vignesh C wrote:
> Thanks for the comments, the updated v9 version patch has the changes
> to fix the same. The other comment regarding stale comments from [1]
> also is addressed in this version. [1] -
> https://www.postgresql.org/message-id/CAFiTN-sKca5sRc1xVL9ghdYT%3DhKtzoNoKMVwbrE1G55J0pdC9A%40mail.gmail.com
Thanks for updating the patch.

I have two minor comments:

1. It looks unnecessary to change this comment:

/*
-        * The actual error must have been reported by the parallel
-        * apply worker.
+        * The parallel apply worker did error-out, the leader apply
+        * worker must exit as well.
         */

2. Since we removed this local variable, the '{' also becomes removable,
as we normally avoid adding it under case condition when no local
variable is declared.

{
-               ErrorData   edata;
-
-               /* Parse ErrorResponse. */
-               pq_parse_errornotice(msg, &edata);

The other part looks good to me.

--
Best Regards,
Zhijie Hou

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-11-10 05:14:35 Re: extension_control_path: ignore empty elements and deduplicate directories
Previous Message Yao Feng 2026-11-10 05:00:51 Re: nbtree: opt-in leaf key prefix compression