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:29:04 +0000 (11:29 +0900)
commit9bdc8b1abd248dfd18952e3d4b4881b5798f505d
treeab3c35b71c62be7f545f00f1824a4688da0c1dec
parent5583a539474e9fd736873bb69dc106a8025c3227
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