]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix race condition when sharing tuple descriptors.
authorThomas Munro <tmunro@postgresql.org>
Sat, 29 May 2021 02:48:15 +0000 (14:48 +1200)
committerThomas Munro <tmunro@postgresql.org>
Sat, 29 May 2021 03:16:15 +0000 (15:16 +1200)
commita15d84470db8f42d3850a007dfa166d3fce5bc66
treec2e1498dfb723988eb79df73be9b4d0c1e906578
parenta44a2b9acfdcff3ba12eea7b6c10b8c1b6182e3f
Fix race condition when sharing tuple descriptors.

Parallel query processes that called BlessTupleDesc() for identical
tuple descriptors at the same moment could crash.  There was code to
handle that rare case, but it dereferenced a bogus DSA pointer.  Repair.

Back-patch to 11, where commit cc5f8136 added support for sharing tuple
descriptors in parallel queries.

Reported-by: Eric Thinnes <e.thinnes@gmx.de>
Discussion: https://postgr.es/m/99aaa2eb-e194-bf07-c29a-1a76b4f2bcf9%40gmx.de
src/backend/utils/cache/typcache.c