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+ysp9c1iduprn79dajsbonwkn0...@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6c426cd43790d56e6b96c21ae2d968ceb733bdde Modified Files -------------- src/backend/statistics/extended_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
