Re: Add null check on get_tablespace_name() return in pg_get_database_ddl_internal

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add null check on get_tablespace_name() return in pg_get_database_ddl_internal
Date: 2026-04-23 00:03:08
Message-ID: 48F28858-660B-4A70-90D2-C4FF45D9E341@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Apr 23, 2026, at 06:20, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com> wrote:
>
> 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
> <0001-Fix-NULL-deref-in-pg_get_database_ddl-on-concurrent-tablespace-drop.patch>

This is a dup of my recent patch, see [1].

[1] https://www.postgresql.org/message-id/573E45C1-31A4-4885-A00C-1A2171159A2A%40gmail.com

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-04-23 00:34:27 Re: EXCEPT TABLE - Case inconsistency for describe \d and \dRp+
Previous Message David Rowley 2026-04-22 23:33:28 Re: [PATCH] Fix hashed ScalarArrayOp semantics for NULL LHS with non-strict comparators