[pgpool-committers: 1056] pgpool: Fix not to bind sockets to network devices when pgpool-II doesn

Yugo Nagata nagata at sraoss.co.jp
Mon Jun 17 16:39:10 JST 2013


Fix not to bind sockets to network devices when pgpool-II doesn't has
root privilege.

SO_BINDTODEVICE socket option is used for binding sockets to network
devices and requires root privilege. However, this is not essential
for the lifecheck mechanism itself, so we use this function only when
pgpool-II has root privilege.

If pgpool-II has root privilege, log message says like;

    wd_create_hb_recv_socket: bind receive socket to device :eth0

otherwise,

    is_usable_bindtodevice: setsockopt(SO_BINDTODEVICE) requires root privilege
    wd_create_hb_recv_socket: couldn't bind receive socket to device :eth0

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=09a6e257c8cf0210408cd1e0f72ad170c9d977e1

Modified Files
--------------
doc/pgpool-en.html              |   43 +++++++++++++++++----------------
doc/pgpool-ja.html              |   34 ++++++++++++--------------
pgpool.conf.sample              |   25 ++++++++++---------
pgpool.conf.sample-master-slave |   27 ++++++++++++---------
pgpool.conf.sample-replication  |   27 ++++++++++++---------
pgpool.conf.sample-stream       |   27 ++++++++++++---------
pool_config.c                   |    6 ++---
pool_config.l                   |    6 ++---
watchdog/wd_heartbeat.c         |   51 +++++++++++++++++++++++++++------------
9 files changed, 139 insertions(+), 107 deletions(-)



More information about the pgpool-committers mailing list