Fix long standing bug in backend flag configuration processing module.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 16 Mar 2020 02:19:15 +0000 (11:19 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 16 Mar 2020 02:19:15 +0000 (11:19 +0900)
commitc728b5669191a9a551a715461a6a0798bff42a09
tree81cf7212e4bee7256ce46b3734e3e3c157eb7301
parentdc3116c797aab862635f2f7c73c6cbd35cd167cc
Fix long standing bug in backend flag configuration processing module.

Recent commit revealed bugs in backend flag (backend_flag0 etc.)
configuration processing module. This leads to massive build farm
failure.

1) The default value for backend flag is ALWAYS_MASTER. This should be
"" (empty string).

2) The final value of the backend flag is the last default for the
flag. This is plain wrong (see BackendFlagsAssignFunc()). The result
value should be OR'ed value of each default value since backend_flag
is a bit data.

Probably we should back port the fix to the other stable branches but
I would like to confirm that the fix does not add bugs or side
effects before doing that.

Discussion:
https://www.pgpool.net/pipermail/pgpool-hackers/2020-March/003553.html
src/config/pool_config_variables.c