Restructure samples of pgpool.conf.
authorToshihiro Kitagawa <kitagawa at sraoss.co.jp>
Thu, 7 Jul 2011 02:15:37 +0000 (02:15 +0000)
committerToshihiro Kitagawa <kitagawa at sraoss.co.jp>
Thu, 7 Jul 2011 02:15:37 +0000 (02:15 +0000)
- separate "ONLINE RECOVERY" section from "REPLICATION MODE" section
  Because online recovery is used with streaming replication too.
- separate "HEALTH CHECK" and "FAILOVER AND FAILBACK" section from
  "MASTER/SLAVE MODE" section
  Because they are mode-independent.
- add backend_flagN directive.
- add "OTHERS" section for relcache_expire directive.
- rename "CONNECTION POOLING MODE" section to "CONNECTION POOLING"
- rename "PARALLEL AND QUERY CACHE MODE" section to
  "PARALLEL MODE AND QUERY CACHE"
- replace "false" with "off" in comment.

pgpool.conf.sample
pgpool.conf.sample-master-slave
pgpool.conf.sample-replication
pgpool.conf.sample-stream

index 6a6fa2631cdbf1f671b796ca71f2278bb783d0cb..9201db1226631e7d6f06f330210c9aca76340122 100644 (file)
@@ -50,11 +50,14 @@ pcp_socket_dir = '/tmp'            # Unix domain socket path for pcp
 #backend_port0 = 5432              # Port number for backend 0
 #backend_weight0 = 1               # Weight for backend 0 (only in load balancing mode)
 #backend_data_directory0 = '/data' # Data directory for backend 0
-
+#backend_flag0 = 'ALLOW_TO_FAILOVER'
+                                   # Controls various backend behavior
+                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
 #backend_hostname1 = 'host2'
 #backend_port1 = 5433
 #backend_weight1 = 1
 #backend_data_directory1 = '/data1'
+#backend_flag1 = 'ALLOW_TO_FAILOVER'
 
 # - Authentication -
 
@@ -148,7 +151,7 @@ logdir = '/tmp'                    # Directory of pgPool status file
 
 
 #------------------------------------------------------------------------------
-# CONNECTION POOLING MODE
+# CONNECTION POOLING
 #------------------------------------------------------------------------------
 
 connection_cache = on              # Activate connection pools
@@ -187,31 +190,16 @@ replication_stop_on_mismatch = off
                                    # On disagreement with the packet kind
                                    # sent from backend, degenerate the node
                                    # which is most likely "minority"
-                                   # If false, just force to exit this session
+                                   # If off, just force to exit this session
 
 failover_if_affected_tuples_mismatch = off
                                    # On disagreement with the number of affected
                                    # tuples in UPDATE/DELETE queries, then
                                    # degenerate the node which is most likely
                                    # "minority".
-                                   # If false, just abort the transaction to
+                                   # If off, just abort the transaction to
                                    # keep the consistency
 
-# - Online recovery -
-
-recovery_user = 'nobody'           # Online recovery user
-recovery_password = ''             # Online recovery password
-recovery_1st_stage_command = ''    # Executes a command in first stage
-recovery_2nd_stage_command = ''    # Executes a command in second stage
-recovery_timeout = 90              # Timeout in seconds to wait for the
-                                   # recovering node's postmaster to start up
-                                   # 0 means no wait
-client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
-                                   # for that many seconds in the second stage
-                                   # of online recovery
-                                   # 0 means no disconnection
-                                   # -1 means immediate disconnection
-
 
 #------------------------------------------------------------------------------
 # LOAD BALANCING MODE
@@ -247,18 +235,9 @@ delay_threshold = 0                # Threshold before detaching node
                                    # Disabled (0) by default
                                    # Health check should be enabled
 
-# - Health check -
-
-health_check_period = 0            # Health check period
-                                   # Disabled (0) by default
-health_check_timeout = 20          # Health check timeout
-                                   # 0 means no timeout
-health_check_user = 'nobody'       # Health check user
-health_check_password = ''         # Password for health check user
-
 # - Special commands -
 
-failover_command = ''              # Executes this command at failover
+follow_master_command = ''         # Executes this command after master failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -269,7 +248,47 @@ failover_command = ''              # Executes this command at failover
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-failback_command = ''              # Executes this command at failback.
+
+
+#------------------------------------------------------------------------------
+# PARALLEL MODE AND QUERY CACHE
+#------------------------------------------------------------------------------
+
+parallel_mode = off                # Activates parallel query mode
+                                   # (change requires restart)
+enable_query_cache = off           # Activates query cache
+                                   # (change requires restart)
+
+pgpool2_hostname = ''              # Set pgpool2 hostname 
+                                   # (change requires restart)
+
+# - System DB info -
+
+system_db_hostname  = 'localhost'   # (change requires restart)
+system_db_port = 5432               # (change requires restart)
+system_db_dbname = 'pgpool'         # (change requires restart)
+system_db_schema = 'pgpool_catalog' # (change requires restart)
+system_db_user = 'pgpool'           # (change requires restart)
+system_db_password = ''             # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# HEALTH CHECK
+#------------------------------------------------------------------------------
+
+health_check_period = 0            # Health check period
+                                   # Disabled (0) by default
+health_check_timeout = 20          # Health check timeout
+                                   # 0 means no timeout
+health_check_user = 'nobody'       # Health check user
+health_check_password = ''         # Password for health check user
+
+
+#------------------------------------------------------------------------------
+# FAILOVER AND FAILBACK
+#------------------------------------------------------------------------------
+
+failover_command = ''              # Executes this command at failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -280,7 +299,7 @@ failback_command = ''              # Executes this command at failback.
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-follow_master_command = ''         # Executes this command after master failover.
+failback_command = ''              # Executes this command at failback.
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -296,38 +315,44 @@ fail_over_on_backend_error = on    # Initiates failover when writing to the
                                    # backend communication socket fails
                                    # This is the same behaviour of pgpool-II
                                    # 2.2.x and previous releases
-                                   # If set to false, pgpool will report an
+                                   # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
 
 #------------------------------------------------------------------------------
-# PARALLEL AND QUERY CACHE MODE
+# ONLINE RECOVERY
 #------------------------------------------------------------------------------
 
-parallel_mode = off                # Activates parallel query mode
-                                   # (change requires restart)
-enable_query_cache = off           # Activates query cache
-                                   # (change requires restart)
+recovery_user = 'nobody'           # Online recovery user
+recovery_password = ''             # Online recovery password
+recovery_1st_stage_command = ''    # Executes a command in first stage
+recovery_2nd_stage_command = ''    # Executes a command in second stage
+recovery_timeout = 90              # Timeout in seconds to wait for the
+                                   # recovering node's postmaster to start up
+                                   # 0 means no wait
+client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
+                                   # for that many seconds in the second stage
+                                   # of online recovery
+                                   # 0 means no disconnection
+                                   # -1 means immediate disconnection
 
-pgpool2_hostname = ''              # Set pgpool2 hostname 
-                                   # (change requires restart)
 
-# - System DB info -
+#------------------------------------------------------------------------------
+# OTHERS
+#------------------------------------------------------------------------------
 
-system_db_hostname  = 'localhost'   # (change requires restart)
-system_db_port = 5432               # (change requires restart)
-system_db_dbname = 'pgpool'         # (change requires restart)
-system_db_schema = 'pgpool_catalog' # (change requires restart)
-system_db_user = 'pgpool'           # (change requires restart)
-system_db_password = ''             # (change requires restart)
+relcache_expire = 0                # Life time of relation cache in seconds.
+                                   # 0 means no cache expiration(the default).
+                                   # The relation cache is used for cache the
+                                   # query result against PostgreSQL system
+                                   # catalog to obtain various information
+                                   # including table structures or if it's a
+                                   # temporary table or not. The cache is
+                                   # maintained in a pgpool child local memory
+                                   # and being kept as long as it survives.
+                                   # If someone modify the table by using
+                                   # ALTER TABLE or some such, the relcache is
+                                   # not consistent anymore.
+                                   # For this purpose, cache_expiration
+                                   # controls the life time of the cache.
 
-# Life time of relation cache in seconds. 0 means no cache
-# expiration(the default).
-# The relation cache is used for cache the query result against PostgreSQL
-# system catalog to obtain various information including table structures
-# or if it's a temporary table or not. The cache is maintained in a pgpool
-# child local memory and being kept as long as it survives.
-# If someone modify the table by using ALTER TABLE or some such, the relcache
-# is not consistent anymore.
-# For this purpose, cache_expiration controls the life time of the cache.
-relcache_expire = 0
index f2c8a1dd04f1a21135166557eab84571e2d8f63e..728eea2ae48b5e857d86507afc2a87acaa961f39 100644 (file)
@@ -50,11 +50,14 @@ backend_hostname0 = 'host1'        # Host name or IP address to connect to for b
 backend_port0 = 5432               # Port number for backend 0
 backend_weight0 = 1                # Weight for backend 0 (only in load balancing mode)
 backend_data_directory0 = '/data'  # Data directory for backend 0
-
+backend_flag0 = 'ALLOW_TO_FAILOVER'
+                                   # Controls various backend behavior
+                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
 backend_hostname1 = 'host2'
-backend_port1 = 5432
+backend_port1 = 5433
 backend_weight1 = 1
 backend_data_directory1 = '/data1'
+backend_flag1 = 'ALLOW_TO_FAILOVER'
 
 # - Authentication -
 
@@ -148,7 +151,7 @@ logdir = '/tmp'                    # Directory of pgPool status file
 
 
 #------------------------------------------------------------------------------
-# CONNECTION POOLING MODE
+# CONNECTION POOLING
 #------------------------------------------------------------------------------
 
 connection_cache = on              # Activate connection pools
@@ -187,31 +190,16 @@ replication_stop_on_mismatch = off
                                    # On disagreement with the packet kind
                                    # sent from backend, degenerate the node
                                    # which is most likely "minority"
-                                   # If false, just force to exit this session
+                                   # If off, just force to exit this session
 
 failover_if_affected_tuples_mismatch = off
                                    # On disagreement with the number of affected
                                    # tuples in UPDATE/DELETE queries, then
                                    # degenerate the node which is most likely
                                    # "minority".
-                                   # If false, just abort the transaction to
+                                   # If off, just abort the transaction to
                                    # keep the consistency
 
-# - Online recovery -
-
-recovery_user = 'nobody'           # Online recovery user
-recovery_password = ''             # Online recovery password
-recovery_1st_stage_command = ''    # Executes a command in first stage
-recovery_2nd_stage_command = ''    # Executes a command in second stage
-recovery_timeout = 90              # Timeout in seconds to wait for the
-                                   # recovering node's postmaster to start up
-                                   # 0 means no wait
-client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
-                                   # for that many seconds in the second stage
-                                   # of online recovery
-                                   # 0 means no disconnection
-                                   # -1 means immediate disconnection
-
 
 #------------------------------------------------------------------------------
 # LOAD BALANCING MODE
@@ -247,18 +235,9 @@ delay_threshold = 0                # Threshold before detaching node
                                    # Disabled (0) by default
                                    # Health check should be enabled
 
-# - Health check -
-
-health_check_period = 0            # Health check period
-                                   # Disabled (0) by default
-health_check_timeout = 20          # Health check timeout
-                                   # 0 means no timeout
-health_check_user = 'nobody'       # Health check user
-health_check_password = ''         # Password for health check user
-
 # - Special commands -
 
-failover_command = ''              # Executes this command at failover
+follow_master_command = ''         # Executes this command after master failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -269,7 +248,47 @@ failover_command = ''              # Executes this command at failover
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-failback_command = ''              # Executes this command at failback.
+
+
+#------------------------------------------------------------------------------
+# PARALLEL MODE AND QUERY CACHE
+#------------------------------------------------------------------------------
+
+parallel_mode = off                # Activates parallel query mode
+                                   # (change requires restart)
+enable_query_cache = off           # Activates query cache
+                                   # (change requires restart)
+
+pgpool2_hostname = ''              # Set pgpool2 hostname 
+                                   # (change requires restart)
+
+# - System DB info -
+
+system_db_hostname  = 'localhost'   # (change requires restart)
+system_db_port = 5432               # (change requires restart)
+system_db_dbname = 'pgpool'         # (change requires restart)
+system_db_schema = 'pgpool_catalog' # (change requires restart)
+system_db_user = 'pgpool'           # (change requires restart)
+system_db_password = ''             # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# HEALTH CHECK
+#------------------------------------------------------------------------------
+
+health_check_period = 0            # Health check period
+                                   # Disabled (0) by default
+health_check_timeout = 20          # Health check timeout
+                                   # 0 means no timeout
+health_check_user = 'nobody'       # Health check user
+health_check_password = ''         # Password for health check user
+
+
+#------------------------------------------------------------------------------
+# FAILOVER AND FAILBACK
+#------------------------------------------------------------------------------
+
+failover_command = ''              # Executes this command at failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -280,7 +299,7 @@ failback_command = ''              # Executes this command at failback.
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-follow_master_command = ''         # Executes this command after master failover.
+failback_command = ''              # Executes this command at failback.
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -296,38 +315,44 @@ fail_over_on_backend_error = on    # Initiates failover when writing to the
                                    # backend communication socket fails
                                    # This is the same behaviour of pgpool-II
                                    # 2.2.x and previous releases
-                                   # If set to false, pgpool will report an
+                                   # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
 
 #------------------------------------------------------------------------------
-# PARALLEL AND QUERY CACHE MODE
+# ONLINE RECOVERY
 #------------------------------------------------------------------------------
 
-parallel_mode = off                # Activates parallel query mode
-                                   # (change requires restart)
-enable_query_cache = off           # Activates query cache
-                                   # (change requires restart)
+recovery_user = 'nobody'           # Online recovery user
+recovery_password = ''             # Online recovery password
+recovery_1st_stage_command = ''    # Executes a command in first stage
+recovery_2nd_stage_command = ''    # Executes a command in second stage
+recovery_timeout = 90              # Timeout in seconds to wait for the
+                                   # recovering node's postmaster to start up
+                                   # 0 means no wait
+client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
+                                   # for that many seconds in the second stage
+                                   # of online recovery
+                                   # 0 means no disconnection
+                                   # -1 means immediate disconnection
 
-pgpool2_hostname = ''              # Set pgpool2 hostname 
-                                   # (change requires restart)
 
-# - System DB info -
+#------------------------------------------------------------------------------
+# OTHERS
+#------------------------------------------------------------------------------
 
-system_db_hostname  = 'localhost'   # (change requires restart)
-system_db_port = 5432               # (change requires restart)
-system_db_dbname = 'pgpool'         # (change requires restart)
-system_db_schema = 'pgpool_catalog' # (change requires restart)
-system_db_user = 'pgpool'           # (change requires restart)
-system_db_password = ''             # (change requires restart)
+relcache_expire = 0                # Life time of relation cache in seconds.
+                                   # 0 means no cache expiration(the default).
+                                   # The relation cache is used for cache the
+                                   # query result against PostgreSQL system
+                                   # catalog to obtain various information
+                                   # including table structures or if it's a
+                                   # temporary table or not. The cache is
+                                   # maintained in a pgpool child local memory
+                                   # and being kept as long as it survives.
+                                   # If someone modify the table by using
+                                   # ALTER TABLE or some such, the relcache is
+                                   # not consistent anymore.
+                                   # For this purpose, cache_expiration
+                                   # controls the life time of the cache.
 
-# Life time of relation cache in seconds. 0 means no cache
-# expiration(the default).
-# The relation cache is used for cache the query result against PostgreSQL
-# system catalog to obtain various information including table structures
-# or if it's a temporary table or not. The cache is maintained in a pgpool
-# child local memory and being kept as long as it survives.
-# If someone modify the table by using ALTER TABLE or some such, the relcache
-# is not consistent anymore.
-# For this purpose, cache_expiration controls the life time of the cache.
-relcache_expire = 0
index eb6ebc776d665f68464cd57e6544ec961f091caa..35e2655f905e32e93a69ccde543647e254c9bd7f 100644 (file)
@@ -50,11 +50,14 @@ backend_hostname0 = 'host1'        # Host name or IP address to connect to for b
 backend_port0 = 5432               # Port number for backend 0
 backend_weight0 = 1                # Weight for backend 0 (only in load balancing mode)
 backend_data_directory0 = '/data'  # Data directory for backend 0
-
+backend_flag0 = 'ALLOW_TO_FAILOVER'
+                                   # Controls various backend behavior
+                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
 backend_hostname1 = 'host2'
-backend_port1 = 5432
+backend_port1 = 5433
 backend_weight1 = 1
 backend_data_directory1 = '/data1'
+backend_flag1 = 'ALLOW_TO_FAILOVER'
 
 # - Authentication -
 
@@ -148,7 +151,7 @@ logdir = '/tmp'                    # Directory of pgPool status file
 
 
 #------------------------------------------------------------------------------
-# CONNECTION POOLING MODE
+# CONNECTION POOLING
 #------------------------------------------------------------------------------
 
 connection_cache = on              # Activate connection pools
@@ -187,31 +190,16 @@ replication_stop_on_mismatch = off
                                    # On disagreement with the packet kind
                                    # sent from backend, degenerate the node
                                    # which is most likely "minority"
-                                   # If false, just force to exit this session
+                                   # If off, just force to exit this session
 
 failover_if_affected_tuples_mismatch = off
                                    # On disagreement with the number of affected
                                    # tuples in UPDATE/DELETE queries, then
                                    # degenerate the node which is most likely
                                    # "minority".
-                                   # If false, just abort the transaction to
+                                   # If off, just abort the transaction to
                                    # keep the consistency
 
-# - Online recovery -
-
-recovery_user = 'nobody'           # Online recovery user
-recovery_password = ''             # Online recovery password
-recovery_1st_stage_command = ''    # Executes a command in first stage
-recovery_2nd_stage_command = ''    # Executes a command in second stage
-recovery_timeout = 90              # Timeout in seconds to wait for the
-                                   # recovering node's postmaster to start up
-                                   # 0 means no wait
-client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
-                                   # for that many seconds in the second stage
-                                   # of online recovery
-                                   # 0 means no disconnection
-                                   # -1 means immediate disconnection
-
 
 #------------------------------------------------------------------------------
 # LOAD BALANCING MODE
@@ -247,18 +235,9 @@ delay_threshold = 0                # Threshold before detaching node
                                    # Disabled (0) by default
                                    # Health check should be enabled
 
-# - Health check -
-
-health_check_period = 0            # Health check period
-                                   # Disabled (0) by default
-health_check_timeout = 20          # Health check timeout
-                                   # 0 means no timeout
-health_check_user = 'nobody'       # Health check user
-health_check_password = ''         # Password for health check user
-
 # - Special commands -
 
-failover_command = ''              # Executes this command at failover
+follow_master_command = ''         # Executes this command after master failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -269,7 +248,47 @@ failover_command = ''              # Executes this command at failover
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-failback_command = ''              # Executes this command at failback.
+
+
+#------------------------------------------------------------------------------
+# PARALLEL MODE AND QUERY CACHE
+#------------------------------------------------------------------------------
+
+parallel_mode = off                # Activates parallel query mode
+                                   # (change requires restart)
+enable_query_cache = off           # Activates query cache
+                                   # (change requires restart)
+
+pgpool2_hostname = ''              # Set pgpool2 hostname 
+                                   # (change requires restart)
+
+# - System DB info -
+
+system_db_hostname  = 'localhost'   # (change requires restart)
+system_db_port = 5432               # (change requires restart)
+system_db_dbname = 'pgpool'         # (change requires restart)
+system_db_schema = 'pgpool_catalog' # (change requires restart)
+system_db_user = 'pgpool'           # (change requires restart)
+system_db_password = ''             # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# HEALTH CHECK
+#------------------------------------------------------------------------------
+
+health_check_period = 0            # Health check period
+                                   # Disabled (0) by default
+health_check_timeout = 20          # Health check timeout
+                                   # 0 means no timeout
+health_check_user = 'nobody'       # Health check user
+health_check_password = ''         # Password for health check user
+
+
+#------------------------------------------------------------------------------
+# FAILOVER AND FAILBACK
+#------------------------------------------------------------------------------
+
+failover_command = ''              # Executes this command at failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -280,7 +299,7 @@ failback_command = ''              # Executes this command at failback.
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-follow_master_command = ''         # Executes this command after master failover.
+failback_command = ''              # Executes this command at failback.
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -296,38 +315,44 @@ fail_over_on_backend_error = on    # Initiates failover when writing to the
                                    # backend communication socket fails
                                    # This is the same behaviour of pgpool-II
                                    # 2.2.x and previous releases
-                                   # If set to false, pgpool will report an
+                                   # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
 
 #------------------------------------------------------------------------------
-# PARALLEL AND QUERY CACHE MODE
+# ONLINE RECOVERY
 #------------------------------------------------------------------------------
 
-parallel_mode = off                # Activates parallel query mode
-                                   # (change requires restart)
-enable_query_cache = off           # Activates query cache
-                                   # (change requires restart)
+recovery_user = 'nobody'           # Online recovery user
+recovery_password = ''             # Online recovery password
+recovery_1st_stage_command = ''    # Executes a command in first stage
+recovery_2nd_stage_command = ''    # Executes a command in second stage
+recovery_timeout = 90              # Timeout in seconds to wait for the
+                                   # recovering node's postmaster to start up
+                                   # 0 means no wait
+client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
+                                   # for that many seconds in the second stage
+                                   # of online recovery
+                                   # 0 means no disconnection
+                                   # -1 means immediate disconnection
 
-pgpool2_hostname = ''              # Set pgpool2 hostname 
-                                   # (change requires restart)
 
-# - System DB info -
+#------------------------------------------------------------------------------
+# OTHERS
+#------------------------------------------------------------------------------
 
-system_db_hostname  = 'localhost'   # (change requires restart)
-system_db_port = 5432               # (change requires restart)
-system_db_dbname = 'pgpool'         # (change requires restart)
-system_db_schema = 'pgpool_catalog' # (change requires restart)
-system_db_user = 'pgpool'           # (change requires restart)
-system_db_password = ''             # (change requires restart)
+relcache_expire = 0                # Life time of relation cache in seconds.
+                                   # 0 means no cache expiration(the default).
+                                   # The relation cache is used for cache the
+                                   # query result against PostgreSQL system
+                                   # catalog to obtain various information
+                                   # including table structures or if it's a
+                                   # temporary table or not. The cache is
+                                   # maintained in a pgpool child local memory
+                                   # and being kept as long as it survives.
+                                   # If someone modify the table by using
+                                   # ALTER TABLE or some such, the relcache is
+                                   # not consistent anymore.
+                                   # For this purpose, cache_expiration
+                                   # controls the life time of the cache.
 
-# Life time of relation cache in seconds. 0 means no cache
-# expiration(the default).
-# The relation cache is used for cache the query result against PostgreSQL
-# system catalog to obtain various information including table structures
-# or if it's a temporary table or not. The cache is maintained in a pgpool
-# child local memory and being kept as long as it survives.
-# If someone modify the table by using ALTER TABLE or some such, the relcache
-# is not consistent anymore.
-# For this purpose, cache_expiration controls the life time of the cache.
-relcache_expire = 0
index 097b8aa07638289690d960def27c2f6aa97f1125..1c44f01486c0d068e3b56237235cc4b4f9dc8670 100644 (file)
@@ -46,15 +46,18 @@ pcp_socket_dir = '/tmp'            # Unix domain socket path for pcp
 
 # - Backend Connection Settings -
 
-backend_hostname0 = 'host1'       # Host name or IP address to connect to for backend 0
-backend_port0 = 5432              # Port number for backend 0
-backend_weight0 = 1               # Weight for backend 0 (only in load balancing mode)
-backend_data_directory0 = '/data' # Data directory for backend 0
-
+backend_hostname0 = 'host1'        # Host name or IP address to connect to for backend 0
+backend_port0 = 5432               # Port number for backend 0
+backend_weight0 = 1                # Weight for backend 0 (only in load balancing mode)
+backend_data_directory0 = '/data'  # Data directory for backend 0
+backend_flag0 = 'ALLOW_TO_FAILOVER'
+                                   # Controls various backend behavior
+                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
 backend_hostname1 = 'host2'
-backend_port1 = 5432
+backend_port1 = 5433
 backend_weight1 = 1
 backend_data_directory1 = '/data1'
+backend_flag1 = 'ALLOW_TO_FAILOVER'
 
 # - Authentication -
 
@@ -149,7 +152,7 @@ logdir = '/tmp'                    # Directory of pgPool status file
 
 
 #------------------------------------------------------------------------------
-# CONNECTION POOLING MODE
+# CONNECTION POOLING
 #------------------------------------------------------------------------------
 
 connection_cache = on              # Activate connection pools
@@ -188,31 +191,16 @@ replication_stop_on_mismatch = off
                                    # On disagreement with the packet kind
                                    # sent from backend, degenerate the node
                                    # which is most likely "minority"
-                                   # If false, just force to exit this session
+                                   # If off, just force to exit this session
 
 failover_if_affected_tuples_mismatch = off
                                    # On disagreement with the number of affected
                                    # tuples in UPDATE/DELETE queries, then
                                    # degenerate the node which is most likely
                                    # "minority".
-                                   # If false, just abort the transaction to
+                                   # If off, just abort the transaction to
                                    # keep the consistency
 
-# - Online recovery -
-
-recovery_user = 'nobody'           # Online recovery user
-recovery_password = ''             # Online recovery password
-recovery_1st_stage_command = ''    # Executes a command in first stage
-recovery_2nd_stage_command = ''    # Executes a command in second stage
-recovery_timeout = 90              # Timeout in seconds to wait for the
-                                   # recovering node's postmaster to start up
-                                   # 0 means no wait
-client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
-                                   # for that many seconds in the second stage
-                                   # of online recovery
-                                   # 0 means no disconnection
-                                   # -1 means immediate disconnection
-
 
 #------------------------------------------------------------------------------
 # LOAD BALANCING MODE
@@ -248,18 +236,9 @@ delay_threshold = 10000000         # Threshold before detaching node
                                    # Disabled (0) by default
                                    # Health check should be enabled
 
-# - Health check -
-
-health_check_period = 0            # Health check period
-                                   # Disabled (0) by default
-health_check_timeout = 20          # Health check timeout
-                                   # 0 means no timeout
-health_check_user = 'nobody'       # Health check user
-health_check_password = ''         # Password for health check user
-
 # - Special commands -
 
-failover_command = ''              # Executes this command at failover
+follow_master_command = ''         # Executes this command after master failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -270,7 +249,47 @@ failover_command = ''              # Executes this command at failover
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-failback_command = ''              # Executes this command at failback.
+
+
+#------------------------------------------------------------------------------
+# PARALLEL MODE AND QUERY CACHE
+#------------------------------------------------------------------------------
+
+parallel_mode = off                # Activates parallel query mode
+                                   # (change requires restart)
+enable_query_cache = off           # Activates query cache
+                                   # (change requires restart)
+
+pgpool2_hostname = ''              # Set pgpool2 hostname 
+                                   # (change requires restart)
+
+# - System DB info -
+
+system_db_hostname  = 'localhost'   # (change requires restart)
+system_db_port = 5432               # (change requires restart)
+system_db_dbname = 'pgpool'         # (change requires restart)
+system_db_schema = 'pgpool_catalog' # (change requires restart)
+system_db_user = 'pgpool'           # (change requires restart)
+system_db_password = ''             # (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# HEALTH CHECK
+#------------------------------------------------------------------------------
+
+health_check_period = 0            # Health check period
+                                   # Disabled (0) by default
+health_check_timeout = 20          # Health check timeout
+                                   # 0 means no timeout
+health_check_user = 'nobody'       # Health check user
+health_check_password = ''         # Password for health check user
+
+
+#------------------------------------------------------------------------------
+# FAILOVER AND FAILBACK
+#------------------------------------------------------------------------------
+
+failover_command = ''              # Executes this command at failover
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -281,7 +300,7 @@ failback_command = ''              # Executes this command at failback.
                                    #   %M = old master node id
                                    #   %P = old primary node id
                                    #   %% = '%' character
-follow_master_command = ''         # Executes this command after master failover.
+failback_command = ''              # Executes this command at failback.
                                    # Special values:
                                    #   %d = node id
                                    #   %h = host name
@@ -297,38 +316,44 @@ fail_over_on_backend_error = on    # Initiates failover when writing to the
                                    # backend communication socket fails
                                    # This is the same behaviour of pgpool-II
                                    # 2.2.x and previous releases
-                                   # If set to false, pgpool will report an
+                                   # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
 
 #------------------------------------------------------------------------------
-# PARALLEL AND QUERY CACHE MODE
+# ONLINE RECOVERY
 #------------------------------------------------------------------------------
 
-parallel_mode = off                # Activates parallel query mode
-                                   # (change requires restart)
-enable_query_cache = off           # Activates query cache
-                                   # (change requires restart)
+recovery_user = 'nobody'           # Online recovery user
+recovery_password = ''             # Online recovery password
+recovery_1st_stage_command = ''    # Executes a command in first stage
+recovery_2nd_stage_command = ''    # Executes a command in second stage
+recovery_timeout = 90              # Timeout in seconds to wait for the
+                                   # recovering node's postmaster to start up
+                                   # 0 means no wait
+client_idle_limit_in_recovery = 0  # Client is disconnected after being idle
+                                   # for that many seconds in the second stage
+                                   # of online recovery
+                                   # 0 means no disconnection
+                                   # -1 means immediate disconnection
 
-pgpool2_hostname = ''              # Set pgpool2 hostname 
-                                   # (change requires restart)
 
-# - System DB info -
+#------------------------------------------------------------------------------
+# OTHERS
+#------------------------------------------------------------------------------
 
-system_db_hostname  = 'localhost'   # (change requires restart)
-system_db_port = 5432               # (change requires restart)
-system_db_dbname = 'pgpool'         # (change requires restart)
-system_db_schema = 'pgpool_catalog' # (change requires restart)
-system_db_user = 'pgpool'           # (change requires restart)
-system_db_password = ''             # (change requires restart)
+relcache_expire = 0                # Life time of relation cache in seconds.
+                                   # 0 means no cache expiration(the default).
+                                   # The relation cache is used for cache the
+                                   # query result against PostgreSQL system
+                                   # catalog to obtain various information
+                                   # including table structures or if it's a
+                                   # temporary table or not. The cache is
+                                   # maintained in a pgpool child local memory
+                                   # and being kept as long as it survives.
+                                   # If someone modify the table by using
+                                   # ALTER TABLE or some such, the relcache is
+                                   # not consistent anymore.
+                                   # For this purpose, cache_expiration
+                                   # controls the life time of the cache.
 
-# Life time of relation cache in seconds. 0 means no cache
-# expiration(the default).
-# The relation cache is used for cache the query result against PostgreSQL
-# system catalog to obtain various information including table structures
-# or if it's a temporary table or not. The cache is maintained in a pgpool
-# child local memory and being kept as long as it survives.
-# If someone modify the table by using ALTER TABLE or some such, the relcache
-# is not consistent anymore.
-# For this purpose, cache_expiration controls the life time of the cache.
-relcache_expire = 0