forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0cf16cb
committed
Don't report stats in LogicalRepApplyLoop() when in xact.
pgstat_report_stat() is only supposed to be called outside of transactions. In5891c7a I added a pgstat_report_stat() call into LogicalRepApplyLoop()'stimeout branch. While not commonly reached inside a transaction, it isreachable (e.g. due to network bottlenecks or the sender being stalled / slowfor some reason).To fix, add a !IsTransactionState() check.No test added because there's no easy way to reproduce this case withoutpatching the code.Reported-By: Erik Rijkers <er@xs4all.nl>Discussion:https://postgr.es/m/b3463b8c-2328-dcac-0136-af95715493c1@xs4all.nl1 parent8d33412 commit0cf16cb
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2883 | 2883 |
| |
2884 | 2884 |
| |
2885 | 2885 |
| |
2886 |
| - | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
2887 | 2891 |
| |
2888 |
| - | |
| 2892 | + | |
| 2893 | + | |
2889 | 2894 |
| |
2890 | 2895 |
| |
2891 | 2896 |
| |
|
0 commit comments
Comments
(0)