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: 'Takeshi Ideriha' <iderihatakeshi(at)gmail(dot)com>, '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-14 09:40:17
Message-ID: OS7PR01MB183171E3155DDCE01A5421CF1F59D2@OS7PR01MB18317.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ideriha-san,

Thanks for the review. PSA v4 patch set.

> I don't have any objections to the fixes and am learning from the fixes.
>
> But let me add two minor comments.
> Do we plan to commit the test codes as well?
> While I was running test codes, I noticed
> src/test/subscription/meson.build lacks
> 't/039_streaming_parallel_apply_error_context.pl line. Without this
> line, meson test don't execute this test.

I think the current code won't be included to core, thus we do not take care
the shape of meson.build (I have tested with fixing it locally).
But it might be better to add for the cfbot. Done.
Also, I found the test sometimes could not launch the parallel apply worker
because of the race condition with the table synchronization. I set to
copy_data = false instead.

> > + 'enable_injection_points': 'yes',
>
> The other minor thing is, I believe we can remove this line from
> injection_points/meson.build since
> the repack test code does not check this environment value and without
> this I was able to execute this test. Moreover, the tests under
> injection_points directory just finish if injection_points is not
> configured according to meson.build.

Indeed, removed. I have not checked well due to the above reason.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v4-0001-Test-to-reproduce-parallel-apply-error-context-is.patch application/octet-stream 10.0 KB
v4-0002-Preserve-an-error-context-before-entering-an-appl.patch application/octet-stream 2.1 KB
v4-0003-Reproduce-the-mixture-of-the-error-context-by-REP.patch application/octet-stream 4.8 KB
v4-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 David Geier 2026-10-14 09:58:37 Re: [PATCH v1] Batch B-tree TIDs when building a bitmap
Previous Message Daria Lepikhova 2026-10-14 09:35:11 Re: Incremental backups report progress as if they were full backups