pgsql: Avoid crash in rare case of concurrent DROP

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Avoid crash in rare case of concurrent DROP
Дата
Msg-id E1mj1DV-0008VR-Qq@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Avoid crash in rare case of concurrent DROP

When a role being dropped contains is referenced by catalog objects that
are concurrently also being dropped, a crash can result while trying to
construct the string that describes the objects.  Suppress that by
ignoring objects whose descriptions are returned as NULL.

The majority of relevant codesites were already cautious about this
already; we had just missed a couple.

This is an old bug, so backpatch all the way back.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/17126-21887f04508cb5c8@postgresql.org

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/catalog/dependency.c  | 31 ++++++++++++++++++++-----------
src/backend/catalog/pg_shdepend.c |  6 ++++++
2 files changed, 26 insertions(+), 11 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Document that ALTER TABLE .. TYPE removes statistics
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: pgsql: Add various assertions to heap pruning code.