Fix bug child_max_connections is not respected if ERROR occurs.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 1 Jan 2021 02:29:04 +0000 (11:29 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 1 Jan 2021 02:39:47 +0000 (11:39 +0900)
commitd61c5d5c884ef630a6dd4da366ea41a10e295f53
tree2c0888e00b6844ce64c09d7b897e9d0a02038d63
parentacb1aa86c6622d413b4d853d9bdb0c967bd50751
Fix bug child_max_connections is not respected if ERROR occurs.

When frontend aborts, the counter for child_max_connections is rewound
because ereport(ERROR) issues long jump. Fix is declaring the variable
with volatile qualifier. This is a long standing bug, probably since
child_max_connections was introduced.
src/protocol/child.c