Fix race condition where heap_delete() fails to pin VM page.
authorJeff Davis <[email protected]>
Thu, 22 Sep 2022 17:58:49 +0000 (10:58 -0700)
committerJeff Davis <[email protected]>
Thu, 22 Sep 2022 18:04:00 +0000 (11:04 -0700)
commit163b0993a162ebae00fe5de8f593a5da28821a1b
treec3ae00157bf9fedf60f36e20357b5a32e5d86bc2
parent790bf615ddba8a0ba3b870915d03438ce9cb7860
Fix race condition where heap_delete() fails to pin VM page.

Similar to 5f12bc94dc, the code must re-check PageIsAllVisible() after
buffer lock is re-acquired. Backpatching to the same version, 12.

Discussion: https://postgr.es/m/CAEP4nAw9jYQDKd_5Y+-s2E4YiUJq1vqiikFjYGpLShtp-K3gag@mail.gmail.com
Reported-by: Robins Tharakan
Reviewed-by: Robins Tharakan
Backpatch-through: 12
src/backend/access/heap/heapam.c