Here is the result of command "show pool_status":<br><br> item | value | description <br>--------------------------------------+--------------------------------+------------------------------------------------------------------<br>
listen_addresses | * | host name(s) or IP address(es) to listen to<br> port | 9999 | pgpool accepting port number<br>
socket_dir | /var/run/postgresql | pgpool socket directory<br> num_init_children | 32 | # of children initially pre-forked<br> child_life_time | 300 | if idle for this seconds, child exits<br>
connection_life_time | 0 | if idle for this seconds, connection closes<br> client_idle_limit | 0 | if idle for this seconds, child connection closes<br>
child_max_connections | 0 | if max_connections received, chile exits<br> max_pool | 10 | max # of connection pool per child<br>
authentication_timeout | 60 | maximum time in seconds to complete client authentication<br> logdir | /tmp | PgPool status file logging directory<br>
log_destination | stderr | logging destination<br> syslog_facility | LOCAL0 | syslog local faclity<br> syslog_ident | pgpool | syslog program ident string<br>
pid_file_name | /var/run/pgpool/pgpool.pid | path to pid file<br> replication_mode | 1 | non 0 if operating in replication mode<br> load_balance_mode | 1 | non 0 if operating in load balancing mode<br>
replication_stop_on_mismatch | 0 | stop replication mode on fatal error<br> failover_if_affected_tuples_mismatch | 0 | failover if affected tuples are mismatch<br>
replicate_select | 0 | non 0 if SELECT statement is replicated<br> reset_query_list | ABORT; DISCARD ALL | queries issued at the end of session<br>
white_function_list | | functions those do not write to database<br> black_function_list | currval,lastval,nextval,setval | functions those write to database<br>
print_timestamp | 1 | if true print time stamp to each log line<br> master_slave_mode | 0 | if true, operate in master/slave mode<br>
master_slave_sub_mode | stream | master/slave sub mode<br> sr_check_period | 10 | sr check period<br> sr_check_user | nobody | sr check user<br>
delay_threshold | 10000000 | standby delay threshold<br> log_standby_delay | if_over_threshold | how to log standby delay<br> connection_cache | 1 | if true, cache connection pool<br>
health_check_timeout | 20 | health check timeout<br> health_check_period | 0 | health check period<br> health_check_user | nobody | health check user<br>
failover_command | | failover command<br> follow_master_command | | follow master command<br>failback_command | | failback command<br>
fail_over_on_backend_error | 1 | fail over on backend error<br> insert_lock | 0 | insert lock<br> ignore_leading_white_space | 1 | ignore leading white spaces<br>
num_reset_queries | 2 | number of queries in reset_query_list<br> pcp_port | 9898 | PCP port # to bind<br> pcp_socket_dir | /var/run/postgresql | PCP socket directory<br>
pcp_timeout | 10 | PCP timeout for an idle client<br> log_statement | 0 | if non 0, logs all SQL statements<br> log_per_node_statement | 0 | if non 0, logs all SQL statements on each node<br>
log_connections | 0 | if true, print incoming connections to the log<br> log_hostname | 0 | if true, resolve hostname for ps and log print<br>
enable_pool_hba | 1 | if true, use pool_hba.conf for client authentication<br> recovery_user | nobody | online recovery user<br>
recovery_1st_stage_command | | execute a command in first stage.<br> recovery_2nd_stage_command | | execute a command in second stage.<br>
recovery_timeout | 90 | max time in seconds to wait for the recovering node's postmaster<br> client_idle_limit_in_recovery | 0 | if idle for this seconds, child connection closes in recovery 2n<br>
lobj_lock_table | | table name used for large object replication control<br> ssl | 0 | SSL support<br> ssl_key | | path to the SSL private key file<br>
ssl_cert | | path to the SSL public certificate file<br> debug_level | 1 | debug message level<br> relcache_expire | 0 | relation cache expiration time in seconds<br>
parallel_mode | 0 | if non 0, run in parallel query mode<br> enable_query_cache | 1 | if non 0, use query cache<br> pgpool2_hostname | cms | pgpool2 hostname<br>
system_db_hostname | localhost | system DB hostname<br> system_db_port | 5432 | system DB port number<br> system_db_dbname | pgpool | system DB name<br>
system_db_schema | pgpool_catalog | system DB schema name<br> system_db_user | pgpool | user name to access system DB<br> backend_hostname0 | 10.0.3.12 | backend #0 hostname<br>
backend_port0 | 5432 | backend #0 port number<br> backend_weight0 | 0.500000 | weight of backend #0<br> backend_status0 | 2 | status of backend #0<br>
standby_delay0 | 0 | standby delay of backend #0<br> backend_flag0 | ALLOW_TO_FAILOVER | backend #0 flag<br>backend_hostname1 | 10.0.3.186 | backend #1 hostname<br>
backend_port1 | 5432 | backend #1 port number<br> backend_weight1 | 0.500000 | weight of backend #1<br> backend_status1 | 3 | status of backend #1<br>
standby_delay1 | 0 | standby delay of backend #1<br> backend_flag1 | ALLOW_TO_FAILOVER | backend #1 flag<br><br><br><div class="gmail_quote">
On Sun, May 27, 2012 at 4:48 PM, Barco You <span dir="ltr"><<a href="mailto:barco.you@bestv-intl.com" target="_blank">barco.you@bestv-intl.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, it's sure that postgresql on two backends running, because I can use psql connect to them!<div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Sun, May 27, 2012 at 4:42 PM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Are you sure that postgresql on 10.0.3.12 is running? If so, execute<br>
"show pool_status" command and check value "backend_status1". That<br>
will show the status of backend1 from the point of view of pgpool. If<br>
pgpool thinks backend1 is not healthy, it does not send create<br>
database command to backend1.<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<div><div><br>
> I install pgpool-II 3.1.3 from source on machine 10.0.3.3 and I have to<br>
> postgres backends (postgresql 9.1) at 10.0.3.12 and 10.0.3.186 respectively.<br>
> I have the following configuration for the pgpool.conf.<br>
><br>
> After I use "psql -h 10.0.3.3 -p 9999 -U postgres" to connect pgpool from<br>
> another machine I can connect correctly and I do "create database xxxxx<br>
> with xxxx" successfully.<br>
> But if I check the backend DB server, only one server (backend_hostname0)<br>
> has the databse xxxx create correctly, there is no this database at<br>
> backend_hostname1.<br>
><br>
> Could you please help indicate why. Thanks!<br>
><br>
> backend_hostname0 = '10.0.3.12'<br>
> # Host name or IP address to connect to<br>
> for bb<br>
> ackend 0<br>
> backend_port0 = 5432<br>
> # Port number for backend 0<br>
> backend_weight0 = 1<br>
> # Weight for backend 0 (only in load<br>
> balancinn<br>
> g mode)<br>
> backend_data_directory0 = '/etc/postgresql/9.1/main'<br>
> # Data directory for backend 0<br>
> backend_flag0 = 'ALLOW_TO_FAILOVER'<br>
> # Controls various backend behavior<br>
> # ALLOW_TO_FAILOVER or<br>
> DISALLOW_TO_FAILOVER<br>
> backend_hostname1 = '10.0.3.186'<br>
> backend_port1 = 5432<br>
> backend_weight1 = 1<br>
> backend_data_directory1 = '/etc/postgresql/9.1/main'<br>
> backend_flag1 = 'ALLOW_TO_FAILOVER'<br>
><br>
> .....<br>
><br>
> replication_mode = on<br>
> ....<br>
> load_balance_mode = on<br>
> # Activate load balancing mode<br>
> # (change requires restart)<br>
> ignore_leading_white_space = on<br>
><br>
><br>
> --<br>
><br>
> Best regards,<br>
> Barco<br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><br>Best regards,<br>Barco<br><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><br>Best regards,<br>Barco<br><br>