postgresql/src/test/regress
Noah Misch 2690a4f5dd Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE.
This WARNING appeared because SearchSysCacheLocked1() read
cc_relisshared before catcache initialization, when the field is false
unconditionally.  On the basis of reading false there, it constructed a
locktag as though pg_tablespace weren't relisshared.  Only shared
catalogs could be affected, and only GRANT TABLESPACE was affected in
practice.  SearchSysCacheLocked1() callers use one other shared-relation
syscache, DATABASEOID.  DATABASEOID is initialized by the end of
CheckMyDatabase(), making the problem unreachable for pg_database.

Back-patch to v13 (all supported versions).  This has no known impact
before v16, where ExecGrant_common() first appeared.  Earlier branches
avoid trouble by having a separate ExecGrant_Tablespace() that doesn't
use LOCKTAG_TUPLE.  However, leaving this unfixed in v15 could ensnare a
future back-patch of a SearchSysCacheLocked1() call.

Reported by Aya Iwata.

Discussion: https://postgr.es/m/OS7PR01MB11964507B5548245A7EE54E70EA212@OS7PR01MB11964.jpnprd01.prod.outlook.com
2024-11-25 14:42:40 -08:00
..
data Fix full text search to handle NOT above a phrase search correctly. 2020-04-27 12:21:04 -04:00
expected Fix improper interactions between session_authorization and role. 2024-11-11 10:29:54 -05:00
input Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. 2024-11-25 14:42:40 -08:00
output Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABLESPACE. 2024-11-25 14:42:40 -08:00
sql Fix improper interactions between session_authorization and role. 2024-11-11 10:29:54 -05:00
.gitignore Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00
GNUmakefile Avoid creating testtablespace directories where not wanted. 2021-05-19 14:04:01 -04:00
Makefile Fix non-GNU makefiles for AIX make. 2017-11-30 00:57:22 -08:00
parallel_schedule Improve test coverage for changes to inplace-updated catalogs. 2024-06-27 19:21:11 -07:00
pg_regress.c Run regression tests with timezone America/Los_Angeles. 2024-09-14 17:55:03 -04:00
pg_regress.h Allow pg_regress.c wrappers to postprocess test result files. 2021-01-11 13:43:19 -05:00
pg_regress_main.c Allow configurable LZ4 TOAST compression. 2021-03-19 15:10:38 -04:00
README Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
regress.c Block environment variable mutations from trusted PL/Perl. 2024-11-11 06:23:47 -08:00
regressplans.sh Fix inconsistencies in the code 2019-07-08 13:15:09 +09:00
resultmap Cygwin and Mingw floating-point fixes. 2019-02-16 01:50:16 +00:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".