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

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Zhijie Hou' <houzhijie22(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(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-10-09 02:34:36
Message-ID: OS7PR01MB183175462A42CCCB15CAF6031F5922@OS7PR01MB18317.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Hou,

> But I think we'd better simply save the error context to
> apply_error_context_stack before adding the error callback as that
> looks better than
> indirectly getting the previous one after adding a new one, and it can save
> readers a few cycles. E.g.,

Indeed, PSA the new version.
Also, I adjusted the order of the initialization of DecodingWorker to align with
the location of attributes.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v3-0001-Test-to-reproduce-parallel-apply-error-context-is.patch application/octet-stream 9.4 KB
v3-0002-Preserve-an-error-context-before-entering-an-appl.patch application/octet-stream 2.1 KB
v3-0003-Reproduce-the-mixture-of-the-error-context-by-REP.patch application/octet-stream 4.9 KB
v3-0004-Preserve-an-error-context-before-launching-a-repa.patch application/octet-stream 2.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Takeshi Ideriha 2026-10-09 02:35:02 Re: Fix doc: explanation of how postgres works when OOM killer is invoked
Previous Message Tender Wang 2026-10-09 02:21:06 Re: "failed to build any N-way joins" from a five-relation query