Commit caa3c42
committed
Don't call elog() while holding spinlock.
Previously UpdateSpillStats() called elog(DEBUG2) while holding
the spinlock even though the local variables that the elog() accesses
don't need to be protected by the lock. Since spinlocks are intended
for very short-term locks, they should not be used when calling
elog(DEBUG2). So this commit moves that elog() out of spinlock period.
Author: Kyotaro Horiguchi
Reviewed-by: Amit Kapila and Fujii Masao
Discussion: https://postgr.es/m/20200602.161518.1399689010416646074.horikyota.ntt@gmail.com1 parent e641b2a commit caa3c42Copy full SHA for caa3c42
File tree
Expand file treeCollapse file tree
1 file changed
+4
-6
lines changedOpen diff view settings
Filter options
- src/backend/replication
Expand file treeCollapse file tree
1 file changed
+4
-6
lines changedOpen diff view settings
Collapse file
src/backend/replication/walsender.c
Copy file name to clipboardExpand all lines: src/backend/replication/walsender.c+4-6Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3685 | 3685 | |
3686 | 3686 | |
3687 | 3687 | |
3688 | | - |
3689 | | - |
3690 | | - |
3691 | | - |
3692 | | - |
3693 | | - |
3694 | 3688 | |
3695 | 3689 | |
3696 | 3690 | |
3697 | 3691 | |
3698 | 3692 | |
3699 | 3693 | |
| 3694 | + |
| 3695 | + |
| 3696 | + |
| 3697 | + |
3700 | 3698 | |
3701 | 3699 | |
0 commit comments