Commit fe30365
committed
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.com1 parent 33cd0e5 commit fe30365
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
501 | | - | |
| 502 | + | |
| 503 | + | |
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
| |||
542 | 544 | | |
543 | 545 | | |
544 | 546 | | |
545 | | - | |
546 | | - | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| |||
0 commit comments