pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL 6+ messages / 1 participants [nested] [flat]
* pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL @ 2024-11-25 22:43 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2024-11-25 22:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/01745fb04d5e910a8f3772469b6015a2beccf027 Modified Files -------------- src/backend/utils/cache/syscache.c | 15 ++++++++++----- src/test/regress/input/tablespace.source | 6 ++++++ src/test/regress/output/tablespace.source | 5 +++++ 3 files changed, 21 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL @ 2024-11-25 22:43 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2024-11-25 22:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2690a4f5ddf2974c322f48588ff6877ec2caade2 Modified Files -------------- src/backend/utils/cache/syscache.c | 15 ++++++++++----- src/test/regress/input/tablespace.source | 6 ++++++ src/test/regress/output/tablespace.source | 5 +++++ 3 files changed, 21 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL @ 2024-11-25 22:43 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2024-11-25 22:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/718af10dab446c2ae73fe027a9f65be69bcf2980 Modified Files -------------- src/backend/utils/cache/syscache.c | 15 ++++++++++----- src/test/regress/expected/tablespace.out | 5 +++++ src/test/regress/sql/tablespace.sql | 6 ++++++ 3 files changed, 21 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL @ 2024-11-25 22:43 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2024-11-25 22:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c1285bbeb962750d9d1aa5e84a6761d7d135146a Modified Files -------------- src/backend/utils/cache/syscache.c | 15 ++++++++++----- src/test/regress/expected/tablespace.out | 5 +++++ src/test/regress/sql/tablespace.sql | 6 ++++++ 3 files changed, 21 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL @ 2024-11-25 22:43 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2024-11-25 22:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4ba84de459532a7a79616e756f8bfd45ba4b8048 Modified Files -------------- src/backend/utils/cache/syscache.c | 15 ++++++++++----- src/test/regress/expected/tablespace.out | 5 +++++ src/test/regress/sql/tablespace.sql | 6 ++++++ 3 files changed, 21 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL @ 2024-11-25 22:43 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 6+ messages in thread From: Noah Misch @ 2024-11-25 22:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/941e0c0df2bcdeb63bd822a1c46818fa9d7d8599 Modified Files -------------- src/backend/utils/cache/syscache.c | 15 ++++++++++----- src/test/regress/expected/tablespace.out | 5 +++++ src/test/regress/sql/tablespace.sql | 6 ++++++ 3 files changed, 21 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2024-11-25 22:43 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-25 22:43 pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL Noah Misch <noah@leadboat.com> 2024-11-25 22:43 pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL Noah Misch <noah@leadboat.com> 2024-11-25 22:43 pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL Noah Misch <noah@leadboat.com> 2024-11-25 22:43 pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL Noah Misch <noah@leadboat.com> 2024-11-25 22:43 pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL Noah Misch <noah@leadboat.com> 2024-11-25 22:43 pgsql: Avoid "you don't own a lock of type ExclusiveLock" in GRANT TABL Noah Misch <noah@leadboat.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox