forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit454aab4
committed
postgres_fdw: Fix bug in connection status check.
The buildfarm member "hake" reported a failure in the regression testadded by commit857df3c, where postgres_fdw_get_connections(true)returned unexpected results.The function postgres_fdw_get_connections(true) checksif a connection is closed by using POLLRDHUP in the requested eventsand calling poll(). Previously, the function only consideredPOLLRDHUP or 0 as valid returned events. However, poll() can alsoreturn POLLHUP, POLLERR, and/or POLLNVAL. So if any of these eventswere returned, postgres_fdw_get_connections(true) would reportincorrect results. postgres_fdw_get_connections(true) failed toaccount for these return events.This commit updates postgres_fdw_get_connections(true) to correctlyreport a closed connection when poll() returns not only POLLRDHUPbut also POLLHUP, POLLERR, or POLLNVAL.Discussion:https://postgr.es/m/fd8f6186-9e1e-4b9a-92c5-e71e3697d381@oss.nttdata.com1 parent4b56bb4 commit454aab4
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2309 | 2309 |
| |
2310 | 2310 |
| |
2311 | 2311 |
| |
2312 |
| - | |
| 2312 | + | |
| 2313 | + | |
2313 | 2314 |
| |
2314 | 2315 |
| |
2315 | 2316 |
| |
|
0 commit comments
Comments
(0)