pgsql: Lock the extension during ALTER EXTENSION ADD/DROP.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Lock the extension during ALTER EXTENSION ADD/DROP.
Дата
Msg-id E1m2cjK-0001cg-2m@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Lock the extension during ALTER EXTENSION ADD/DROP.

Although we were careful to lock the object being added or dropped,
we failed to get any sort of lock on the extension itself.  This
allowed the ALTER to proceed in parallel with a DROP EXTENSION,
which is problematic for a couple of reasons.  If both commands
succeeded we'd be left with a dangling link in pg_depend, which
would cause problems later.  Also, if the ALTER failed for some
reason, it might try to print the extension's name, and that could
result in a crash or (in older branches) a silly error message
complaining about extension "(null)".

Per bug #17098 from Alexander Lakhin.  Back-patch to all
supported branches.

Discussion: https://postgr.es/m/17098-b960f3616c861f83@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6bd9ae173d372480ee8aed1164ec03e03daff0a1

Modified Files
--------------
src/backend/commands/extension.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix pgbench timestamp bugs.
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: pageinspect: Improve page_header() for pages of 32kB