Commit 30d47ec
committed
Unpin buffer before inplace update waits for an XID to end.
Commit a07e03f changed inplace updates
to wait for heap_update() commands like GRANT TABLE and GRANT DATABASE.
By keeping the pin during that wait, a sequence of autovacuum workers
and an uncommitted GRANT starved one foreground LockBufferForCleanup()
for six minutes, on buildfarm member sarus. Prevent, at the cost of a
bit of complexity. Back-patch to v12, like the earlier commit. That
commit and heap_inplace_lock() have not yet appeared in any release.
Discussion: https://postgr.es/m/20241026184936.ae.nmisch@google.com1 parent 502e7bf commit 30d47ec
3 files changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6165 | 6165 | | |
6166 | 6166 | | |
6167 | 6167 | | |
6168 | | - | |
6169 | | - | |
| 6168 | + | |
| 6169 | + | |
6170 | 6170 | | |
6171 | 6171 | | |
6172 | 6172 | | |
| |||
6200 | 6200 | | |
6201 | 6201 | | |
6202 | 6202 | | |
6203 | | - | |
| 6203 | + | |
| 6204 | + | |
6204 | 6205 | | |
6205 | 6206 | | |
6206 | 6207 | | |
| |||
6265 | 6266 | | |
6266 | 6267 | | |
6267 | 6268 | | |
| 6269 | + | |
6268 | 6270 | | |
6269 | 6271 | | |
6270 | 6272 | | |
| |||
6280 | 6282 | | |
6281 | 6283 | | |
6282 | 6284 | | |
| 6285 | + | |
6283 | 6286 | | |
6284 | 6287 | | |
6285 | 6288 | | |
| |||
6291 | 6294 | | |
6292 | 6295 | | |
6293 | 6296 | | |
| 6297 | + | |
6294 | 6298 | | |
6295 | 6299 | | |
6296 | 6300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| 817 | + | |
817 | 818 | | |
818 | 819 | | |
819 | 820 | | |
| |||
835 | 836 | | |
836 | 837 | | |
837 | 838 | | |
838 | | - | |
| 839 | + | |
839 | 840 | | |
840 | 841 | | |
841 | | - | |
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
872 | 870 | | |
873 | 871 | | |
874 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
0 commit comments