From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix race condition in statext_store(). |
Date: | 2020-03-31 21:06:29 |
Message-ID: | E1jJO5d-0004TD-M6@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix race condition in statext_store().
Must hold some lock on the pg_statistic_ext_data catalog *before*
we look up the tuple we aim to replace. Otherwise a concurrent
VACUUM FULL or similar operation could move it to a different TID,
leaving us trying to replace the wrong tuple.
Back-patch to v12 where this got broken.
Credit goes to Dean Rasheed; I'm just doing the clerical work.
Discussion: https://postgr.es/m/CAEZATCU0zHMDiQV0g8P2U+YSP9C1idUPrn79DajsbonwkN0xvQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fe3036527a1ff715bceb22ff5cba919001262a71
Modified Files
--------------
src/backend/statistics/extended_stats.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-03-31 21:07:48 | pgsql: doc: clarify which table creation is used for inheritance part. |
Previous Message | Bruce Momjian | 2020-03-31 20:31:52 | pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM |