pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix two crashes on a concurrently dropped schema
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/275ad2006df5750e0c7c836f9d48ce2743389d7a

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/77705d1e5a616339c3e92f586bbfa7b6bb562beb

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4c0e3c1bfcf9d14b1be3f680c0c3be9f6101d861

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d3a03158c9cadd4a431eafc3d5bd438aa6d63e89

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f1ba2b826c52ab6e593d5d25c15dbde9d417f386

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a2732c98671d86a06f7ec21d469a52a7bf4efdc9

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix two crashes on a concurrently dropped schema
@ 2026-10-31 11:47  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-10-31 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix two crashes on a concurrently dropped schema

pg_identify_object() looks up the object's schema name without a lock
on the schema, so a concurrent DROP SCHEMA can make get_namespace_name()
return NULL, which was then passed to quote_identifier().  Report the
schema as NULL instead, as is already done for objects that have gone
away.

Similarly, schema_to_xml() and the related SQL/XML functions look up
the schema name without a lock on the schema, and a concurrent DROP
SCHEMA can make get_namespace_name() return NULL, which was then
dereferenced.  Report that the schema does not exist, or skip it when
mapping all schemas of the database.

Author: Baji Shaik <baji.pgdev@gmail.com>
Discussion: https://www.postgresql.org/message-id/CA+fm-RPD0m9QL8W+804SGBBxn5iFz5wn=kncaP9SkM-s4PUANw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bb0615c890e2b64d6959ac5c61bf47d206c5d70f

Modified Files
--------------
src/backend/catalog/objectaddress.c | 13 +++++++-----
src/backend/utils/adt/xml.c         | 40 ++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2026-10-31 11:47 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-10-31 11:47 pgsql: Fix two crashes on a concurrently dropped schema Heikki Linnakangas <heikki.linnakangas@iki.fi>

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