agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid SIGSEGV in pg_get_database_ddl() on NULL tablespace
Date: Thu, 30 Apr 2026 14:52:33 +0000
Message-ID: <E1wISki-003TMJ-31@gemulon.postgresql.org> (raw)
Avoid SIGSEGV in pg_get_database_ddl() on NULL tablespace
There is a narrow race in which a concurrent ALTER DATABASE ... SET
TABLESPACE moves the database off the tablespace and a DROP TABLESPACE
removes it between the syscache lookup and the catalog scan. If that
happens, output an error.
Author: Chao Li <lic@highgo.com>
Reviewed-by: Jack Bonatakis <jack@bonatak.is>
Reviewed-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Discussion: https://postgr.es/m/573E45C1-31A4-4885-A00C-1A2171159A2A@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5642a0367c2fe69684800c5d5c5929c20d99ef72
Modified Files
--------------
src/backend/utils/adt/ddlutils.c | 7 +++++++
1 file changed, 7 insertions(+)
Message-ID: <E1wISki-003TMJ-31@gemulon.postgresql.org>
Permalink: ../E1wISki-003TMJ-31@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wISki-003TMJ-31@gemulon.postgresql.org
reply
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: andrew@dunslane.net, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Avoid SIGSEGV in pg_get_database_ddl() on NULL tablespace
In-Reply-To: <E1wISki-003TMJ-31@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox