From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dafoer_x@163.com
Subject: BUG #18331: Why is the session lock (DEFAULT_LOCKMETHOD) not automatically released during process exit?
Date: Mon, 05 Feb 2024 07:28:53 +0000
Message-ID: <18331-b44b290d8d84d690@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18331
Logged by: Why is the session lock (DEFAULT_LOCKMETHOD) not automatically released
during process exit?
Email address: dafoer_x@163.com
PostgreSQL version: 16.1
Operating system: centos_x86
Description:
I have some doubts about the implementation of session locks. Can you help
me clarify my questions?
The comment for the function LockRelationIdForSession mentions “It will be
removed when UnlockRelationIdForSession() is called, or if an
ereport(ERROR) occurs, or if the backend exits.”
However, the callback function ShutdownPostgres, which is triggered during
process exit, only cleans up locks of type USER_LOCKMETHOD. Is it possible
to automatically clean up session locks of type DEFAULT_LOCKMETHOD?
What risks or implications would there be if session locks of type
USER_LOCKMETHOD were automatically cleaned up during process exit?
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dafoer_x@163.com
Subject: Re: BUG #18331: Why is the session lock (DEFAULT_LOCKMETHOD) not automatically released during process exit?
In-Reply-To: <18331-b44b290d8d84d690@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