Re: PG16 walsender hangs in ResourceArrayEnlarge using pgoutput

Bowen Shi <zxwsbg12138@gmail.com>

From: Bowen Shi <zxwsbg12138@gmail.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2024-06-26T06:30:14Z
Lists: pgsql-bugs
Hi,

On Tue, Jun 25, 2024 at 7:47 PM Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
wrote:

> You analysis looks good to me, I think I missed to drop the newly created
> slot when changing the logic to support row filter. Here is a small patch
> to drop the slots in each cycle, it can fix the issue on my machine.
>
> IIUC, the issue exists from PG15~HEAD. The current patch can apply
> on PG16~HEAD, If it looks ok, I will test and prepare the patch for the
> other branch.


This patch looks good to me. I tested again and didn't reproduce the
problem.

Regards,
Bowen Shi

Commits

  1. Drop the temporary tuple slots allocated by pgoutput.

  2. Refactor pgoutput_change().

  3. Allow specifying row filters for logical replication of tables.