[pgpool-hackers: 2339] Re: [pgpool-committers: 4036] pgpool: Use volatile pointer for Req_info variable.
Tatsuo Ishii
ishii at sraoss.co.jp
Tue May 16 20:55:30 JST 2017
Usama,
Watchdog uses shared memory and I wonder if some of pointer variables
to the shared memory are may need "volatile" to make sure that they
fetch the fresh value. What do you think?
/* shared memory variables */
char *watchdog_ipc_address = NULL;
bool *watchdog_require_cleanup = NULL; /* shared memory variable set to true
* when watchdog process terminates abnormally
*/
bool *watchdog_node_escalated = NULL; /* shared memory variable set to true
* when watchdog process has performed escalation
*/
unsigned int *ipc_shared_key = NULL; /* key lives in shared memory
* used to identify the ipc internal
* clients
*/
> Use volatile pointer for Req_info variable.
>
> Since Req_info points to shared memory area, using volatile pointer
> will allow to fetch the fresh value.
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=a4de4bfc1421d787b53789eb62eb7e9cb26e91c1
>
> Modified Files
> --------------
> src/include/pool.h | 2 +-
> src/main/pgpool_main.c | 2 +-
> src/test/regression/tests/010.rewrite_timestamp/timestamp/main.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
More information about the pgpool-hackers
mailing list