Add null check on get_tablespace_name() return in pg_get_database_ddl_internal
SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
From: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-22T22:20:36Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-NULL-deref-in-pg_get_database_ddl-on-concurrent-tablespace-drop.patch (application/octet-stream) patch 0001
Hi Hackers, A concurrent tablespace drop could lead to null deref in pg_get_database_ddl. I acknowledge this is a corner case. Adding a patch to fix this to keep the code clean. Thanks, Satya