pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix race condition in statext_store(). 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix race condition in statext_store(). @ 2020-03-31 21:06 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2020-03-31 21:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix race condition in statext_store(). @ 2020-03-31 21:06 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2020-03-31 21:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-03-31 21:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-31 21:06 pgsql: Fix race condition in statext_store(). Tom Lane <tgl@sss.pgh.pa.us> 2020-03-31 21:06 pgsql: Fix race condition in statext_store(). Tom Lane <tgl@sss.pgh.pa.us>
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