pgsql: Avoid SIGSEGV in pg_get_database_ddl() on NULL tablespace - Mailing list pgsql-committers

From Andrew Dunstan
Subject pgsql: Avoid SIGSEGV in pg_get_database_ddl() on NULL tablespace
Date
Msg-id E1wISki-003TMJ-31@gemulon.postgresql.org
Whole thread
List pgsql-committers
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(+)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: Fix data_checksum GUC show_hook
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Fix attnum remapping in generateClonedExtStatsStmt()