Commit c2139db
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 8f1759c commit c2139db
3 files changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5974 | 5974 | | |
5975 | 5975 | | |
5976 | 5976 | | |
5977 | | - | |
5978 | | - | |
| 5977 | + | |
| 5978 | + | |
5979 | 5979 | | |
5980 | 5980 | | |
5981 | 5981 | | |
| |||
6009 | 6009 | | |
6010 | 6010 | | |
6011 | 6011 | | |
6012 | | - | |
| 6012 | + | |
| 6013 | + | |
6013 | 6014 | | |
6014 | 6015 | | |
6015 | 6016 | | |
| |||
6074 | 6075 | | |
6075 | 6076 | | |
6076 | 6077 | | |
| 6078 | + | |
6077 | 6079 | | |
6078 | 6080 | | |
6079 | 6081 | | |
| |||
6089 | 6091 | | |
6090 | 6092 | | |
6091 | 6093 | | |
| 6094 | + | |
6092 | 6095 | | |
6093 | 6096 | | |
6094 | 6097 | | |
| |||
6100 | 6103 | | |
6101 | 6104 | | |
6102 | 6105 | | |
| 6106 | + | |
6103 | 6107 | | |
6104 | 6108 | | |
6105 | 6109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
707 | 708 | | |
708 | 709 | | |
709 | 710 | | |
| |||
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
728 | | - | |
| 729 | + | |
729 | 730 | | |
730 | 731 | | |
731 | | - | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
762 | 760 | | |
763 | 761 | | |
764 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
0 commit comments