aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeBitmapHeapscan.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-03-12 10:18:32 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-03-12 10:18:53 +0200
commitad5cd55e675c6b55a521d9db5e57bba5a02a9208 (patch)
tree6302346febad111bff01866e96038818faa72a79 /src/backend/executor/nodeBitmapHeapscan.c
parent8472668ba782e5c00a4fe6e7280516024765c4c0 (diff)
downloadpostgresql-ad5cd55e675c6b55a521d9db5e57bba5a02a9208.tar.gz
postgresql-ad5cd55e675c6b55a521d9db5e57bba5a02a9208.zip
Disconnect if socket cannot be put into non-blocking mode
Commit 387da18874 moved the code to put socket into non-blocking mode from socket_set_nonblocking() into the one-time initialization function, pq_init(). In socket_set_nonblocking(), there indeed was a risk of recursion on failure like the comment said, but in pq_init(), ERROR or FATAL is fine. There's even another elog(FATAL) just after this, if setting FD_CLOEXEC fails. Note that COMMERROR merely logged the error, it did not close the connection, so if putting the socket to non-blocking mode failed we would use the connection anyway. You might not immediately notice, because most socket operations in a regular backend wait for the socket to become readable/writable anyway. But e.g. replication will be quite broken. Backpatch to all supported versions. Discussion: https://www.postgresql.org/message-id/d40a5cd0-2722-40c5-8755-12e9e811fa3c@iki.fi
Diffstat (limited to 'src/backend/executor/nodeBitmapHeapscan.c')
0 files changed, 0 insertions, 0 deletions