pgsql: Fix race condition when sharing tuple descriptors.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix race condition when sharing tuple descriptors.
Date: 2021-05-29 03:48:46
Message-ID: E1lmpxu-0008JP-IM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)thinnes(at)gmx(dot)de>
Discussion: https://postgr.es/m/99aaa2eb-e194-bf07-c29a-1a76b4f2bcf9%40gmx.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b1d6538903504904db44679355ac109aeda01737

Modified Files
--------------
src/backend/utils/cache/typcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-05-29 03:49:07 pgsql: Fix race condition when sharing tuple descriptors.
Previous Message Andrew Dunstan 2021-05-28 13:37:00 pgsql: fix syntax error