postgresql/src
Alvaro Herrera 3ce3fb2f7d
Ensure correct lock level is used in ALTER ... RENAME
Commit 1b5d797cd4 intended to relax the lock level used to rename
indexes, but inadvertently allowed *any* relation to be renamed with a
lowered lock level, as long as the command is spelled ALTER INDEX.
That's undesirable for other relation types, so retry the operation with
the higher lock if the relation turns out not to be an index.

After this fix, ALTER INDEX <sometable> RENAME will require access
exclusive lock, which it didn't before.

Author: Nathan Bossart <bossartn@amazon.com>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reported-by: Onder Kalaci <onderk@microsoft.com>
Discussion: https://postgr.es/m/PH0PR21MB1328189E2821CDEC646F8178D8AE9@PH0PR21MB1328.namprd21.prod.outlook.com
2021-10-19 19:08:45 -03:00
..
backend Ensure correct lock level is used in ALTER ... RENAME 2021-10-19 19:08:45 -03:00
bin Fix bug in TOC file error message printing 2021-10-19 12:59:54 +02:00
common Fix memory leak in pg_hmac 2021-10-01 22:47:05 +02:00
fe_utils Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
include Reset properly snapshot export state during transaction abort 2021-10-18 11:56:48 +09:00
interfaces Translation updates 2021-09-20 16:23:13 +02:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Fix checking of query type in plpgsql's RETURN QUERY command. 2021-10-03 13:21:20 -04:00
port AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:28:02 -07:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Ensure correct lock level is used in ALTER ... RENAME 2021-10-19 19:08:45 -03:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Fix WAL replay in presence of an incomplete record 2021-09-29 11:41:01 -03:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Fix prove_installcheck to use correct paths when used with PGXS 2021-07-01 08:46:21 -04:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:28:02 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00