forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7900269
committed
Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery.
This patch ensures that, if any notify messages were received duringa just-finished transaction, they get sent to the frontend just beforenot just after the ReadyForQuery message. With libpq and other clientlibraries that act similarly, this guarantees that the client will seethe notify messages as available as soon as it thinks the transactionis done.This probably makes no difference in practice, since in realisticuse-cases the application would have to cope with asynchronousarrival of notify events anyhow. However, it makes it a lot easierto build cross-session-notify test cases with stable behavior.I'm a bit surprised now that we've not seen any buildfarm instabilitywith the test cases added by commitb10f40b. Tests that I intendto add in an upcoming bug fix are definitely unstable without this.Back-patch to 9.6, which is as far back as we can do NOTIFY testingwith the isolationtester infrastructure.Discussion:https://postgr.es/m/13881.1574557302@sss.pgh.pa.us1 parent8b7ae5a commit7900269
2 files changed
+18
-5
lines changedLines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1885 | 1885 |
| |
1886 | 1886 |
| |
1887 | 1887 |
| |
1888 |
| - | |
1889 |
| - | |
1890 |
| - | |
1891 |
| - | |
1892 |
| - | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1893 | 1895 |
| |
1894 | 1896 |
| |
1895 | 1897 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4194 | 4194 |
| |
4195 | 4195 |
| |
4196 | 4196 |
| |
| 4197 | + | |
4197 | 4198 |
| |
| 4199 | + | |
| 4200 | + | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
4198 | 4209 |
| |
4199 | 4210 |
| |
4200 | 4211 |
| |
|
0 commit comments
Comments
(0)