https://github.com/postgres/postgres
Revision 69dfc36fd54d1620209d5d40f3c68006d96b0046 authored by Tom Lane on 11 July 2021, 16:54:24 UTC, committed by Tom Lane on 11 July 2021, 16:54:24 UTC
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
1 parent 5614a0f
Raw File
Tip revision: 69dfc36fd54d1620209d5d40f3c68006d96b0046 authored by Tom Lane on 11 July 2021, 16:54:24 UTC
Lock the extension during ALTER EXTENSION ADD/DROP.
Tip revision: 69dfc36
.gitattributes
*		whitespace=space-before-tab,trailing-space
*.[chly]	whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
*.pl		whitespace=space-before-tab,trailing-space,tabwidth=4
*.po		whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
*.sgml		whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eol
*.x[ms]l	whitespace=space-before-tab,trailing-space,tab-in-indent

# Avoid confusing ASCII underlines with leftover merge conflict markers
README		conflict-marker-size=32
README.*	conflict-marker-size=32

# Certain data files that contain special whitespace, and other special cases
*.data						-whitespace
contrib/pgcrypto/sql/pgp-armor.sql		whitespace=-blank-at-eol
src/backend/catalog/sql_features.txt		whitespace=space-before-tab,blank-at-eof,-blank-at-eol
src/backend/utils/Gen_dummy_probes.pl.prolog	whitespace=-blank-at-eof

# Test output files that contain extra whitespace
*.out					-whitespace
contrib/*/output/*.source		-whitespace
src/pl/plpgsql/src/output/*.source	-whitespace
src/test/regress/output/*.source	-whitespace
src/interfaces/ecpg/test/expected/*	-whitespace
src/interfaces/libpq/test/expected.out	whitespace=-blank-at-eof

# These files are maintained or generated elsewhere.  We take them as is.
configure				-whitespace
ppport.h				-whitespace
src/backend/regex/COPYRIGHT		-whitespace
src/backend/regex/re_syntax.n		-whitespace
src/backend/snowball/libstemmer/*.c	-whitespace
src/backend/utils/mb/Unicode/*-std.txt	-whitespace
src/include/snowball/libstemmer/*	-whitespace
src/timezone/data/*			-whitespace
back to top