From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix assertion failure in apply worker.
Date: Wed, 03 May 2023 05:09:39 +0000
Message-ID: <E1pu4kF-000DVv-56@gemulon.postgresql.org> (raw)
Fix assertion failure in apply worker.
During exit, the logical replication apply worker tries to release session
level locks, if any. However, if the apply worker exits due to an error
before its connection is initialized, trying to release locks can lead to
assertion failure. The locks will be acquired once the worker is
initialized, so we don't need to release them till the worker
initialization is complete.
Reported-by: Alexander Lakhin
Author: Hou Zhijie based on inputs from Sawada Masahiko and Amit Kapila
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/2185d65f-5aae-3efa-c48f-fb42b173ef5c@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/de63f8dadee4afa152ce177fd3c562d47373a728
Modified Files
--------------
src/backend/replication/logical/applyparallelworker.c | 4 ++++
src/backend/replication/logical/launcher.c | 5 ++++-
src/backend/replication/logical/worker.c | 7 +++++++
src/include/replication/worker_internal.h | 2 ++
4 files changed, 17 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix assertion failure in apply worker.
In-Reply-To: <E1pu4kF-000DVv-56@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox