~ubuntu-branches/ubuntu/oneiric/pgpool2/oneiric

« back to all changes in this revision

Viewing changes to pgpool.conf.sample-stream

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2011-06-10 10:18:29 UTC
  • mfrom: (1.1.6 upstream) (4.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110610101829-m1aig6u0p74qpif3
Tags: 3.0.4-1
* New upstream release
* Use format 3.0 (quilt).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# pgpool-II configuration file sample for Stream replication/Hot standby.
 
3
# $Header: /cvsroot/pgpool/pgpool-II/pgpool.conf.sample-stream,v 1.5.2.3 2011/05/11 01:57:13 t-ishii Exp $
 
4
 
 
5
# Host name or IP address to listen on: '*' for all, '' for no TCP/IP
 
6
# connections
 
7
listen_addresses = 'localhost'
 
8
 
 
9
# Port number for pgpool
 
10
port = 5433
 
11
 
 
12
# Port number for pgpool communication manager
 
13
pcp_port = 9898
 
14
 
 
15
# Unix domain socket path.  (The Debian package defaults to
 
16
# /var/run/postgresql.)
 
17
socket_dir = '/var/run/postgresql'
 
18
 
 
19
# Unix domain socket path for pgpool communication manager.
 
20
# (Debian package defaults to /var/run/postgresql)
 
21
pcp_socket_dir = '/var/run/postgresql'
 
22
 
 
23
# Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql!
 
24
backend_socket_dir = '/var/run/postgresql'
 
25
 
 
26
# pgpool communication manager timeout. 0 means no timeout. This parameter is ignored now.
 
27
pcp_timeout = 10
 
28
 
 
29
# number of pre-forked child process
 
30
num_init_children = 32
 
31
 
 
32
# Number of connection pools allowed for a child process
 
33
max_pool = 4
 
34
 
 
35
# If idle for this many seconds, child exits.  0 means no timeout.
 
36
child_life_time = 300
 
37
 
 
38
# If idle for this many seconds, connection to PostgreSQL closes.
 
39
# 0 means no timeout.
 
40
connection_life_time = 0
 
41
 
 
42
# If child_max_connections connections were received, child exits.
 
43
# 0 means no exit.
 
44
child_max_connections = 0
 
45
 
 
46
# If client_idle_limit is n (n > 0), the client is forced to be
 
47
# disconnected whenever after n seconds idle (even inside an explicit
 
48
# transactions!)
 
49
# 0 means no disconnect.
 
50
client_idle_limit = 0
 
51
 
 
52
# Maximum time in seconds to complete client authentication.
 
53
# 0 means no timeout.
 
54
authentication_timeout = 60
 
55
 
 
56
# Logging directory
 
57
logdir = '/var/log/postgresql'
 
58
 
 
59
# pid file name
 
60
pid_file_name = '/var/run/postgresql/pgpool.pid'
 
61
 
 
62
# Replication mode
 
63
replication_mode = false
 
64
 
 
65
# Load balancing mode, i.e., all SELECTs are load balanced.
 
66
load_balance_mode = true
 
67
 
 
68
# If there's a disagreement with the packet kind sent from backend,
 
69
# then degenrate the node which is most likely "minority".  If false,
 
70
# just force to exit this session.
 
71
replication_stop_on_mismatch = false
 
72
 
 
73
# If there's a disagreement with the number of affected tuples in
 
74
# UPDATE/DELETE, then degenrate the node which is most likely
 
75
# "minority".
 
76
# If false, just abort the transaction to keep the consistency.
 
77
failover_if_affected_tuples_mismatch = false
 
78
 
 
79
# If true, replicate SELECT statement when replication_mode or parallel_mode is enabled.
 
80
# A priority of replicate_select is higher than load_balance_mode.
 
81
replicate_select = false
 
82
 
 
83
# Semicolon separated list of queries to be issued at the end of a
 
84
# session
 
85
reset_query_list = 'ABORT; DISCARD ALL'
 
86
# for 8.2 or older this should be as follows. 
 
87
#reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
 
88
 
 
89
# white_function_list is a comma separated list of function names
 
90
# those do not write to database. Any functions not listed here
 
91
# are regarded to write to database and SELECTs including such 
 
92
# writer-functions will be executed on master(primary) in master/slave
 
93
# mode, or executed on all DB nodes in replication mode.
 
94
#
 
95
# black_function_list is a comma separated list of function names
 
96
# those write to database. Any functions not listed here
 
97
# are regarded not to write to database and SELECTs including such 
 
98
# read-only-functions will be executed on any DB nodes.
 
99
#
 
100
# You cannot make full both white_function_list and
 
101
# black_function_list at the same time. If you specify something in
 
102
# one of them, you should make empty other.
 
103
#
 
104
# Pre 3.0 pgpool-II recognizes nextval and setval in hard coded
 
105
# way. Following setting will do the same as the previous version.
 
106
# white_function_list = ''
 
107
# black_function_list = 'nextval,setval'
 
108
white_function_list = ''
 
109
black_function_list = 'currval,lastval,nextval,setval'
 
110
 
 
111
# If true print timestamp on each log line.
 
112
print_timestamp = true
 
113
 
 
114
# If true, operate in master/slave mode.
 
115
master_slave_mode = true
 
116
 
 
117
# Master/slave sub mode. either 'slony' or 'stream'. Default is 'slony'.
 
118
master_slave_sub_mode = 'stream'
 
119
 
 
120
# If the standby server delays more than delay_threshold,
 
121
# any query goes to the primary only. The unit is in bytes.
 
122
# 0 disables the check. Default is 0.
 
123
# Note that health_check_period required to be greater than 0
 
124
# to enable the functionality.
 
125
delay_threshold = 10000000
 
126
 
 
127
# 'always' logs the standby delay whenever health check runs.
 
128
# 'if_over_threshold' logs only if the delay exceeds delay_threshold.
 
129
# 'none' disables the delay log.
 
130
log_standby_delay = 'if_over_threshold'
 
131
 
 
132
# If true, cache connection pool.
 
133
connection_cache = true
 
134
 
 
135
# Health check timeout.  0 means no timeout.
 
136
health_check_timeout = 20
 
137
 
 
138
# Health check period.  0 means no health check.
 
139
health_check_period = 0
 
140
 
 
141
# Health check user
 
142
health_check_user = 'nobody'
 
143
 
 
144
# Execute command by failover.
 
145
# special values:  %d = node id
 
146
#                  %h = host name
 
147
#                  %p = port number
 
148
#                  %D = database cluster path
 
149
#                  %m = new master node id
 
150
#                  %H = hostname of the new master node
 
151
#                  %M = old master node id
 
152
#                  %P = old primary node id
 
153
#                  %% = '%' character
 
154
#
 
155
failover_command = ''
 
156
 
 
157
# Execute command by failback.
 
158
# special values:  %d = node id
 
159
#                  %h = host name
 
160
#                  %p = port number
 
161
#                  %D = database cluster path
 
162
#                  %m = new master node id
 
163
#                  %H = hostname of the new master node
 
164
#                  %M = old master node id
 
165
#                  %P = old primary node id
 
166
#                  %% = '%' character
 
167
#
 
168
failback_command = ''
 
169
 
 
170
# If true, trigger fail over when writing to the backend communication
 
171
# socket fails. This is the same behavior of pgpool-II 2.2.x or
 
172
# earlier. If set to false, pgpool will report an error and disconnect
 
173
# the session.
 
174
fail_over_on_backend_error = true
 
175
 
 
176
# If true, automatically locks a table with INSERT statements to keep
 
177
# SERIAL data consistency.  If the data does not have SERIAL data
 
178
# type, no lock will be issued. An /*INSERT LOCK*/ comment has the
 
179
# same effect.  A /*NO INSERT LOCK*/ comment disables the effect.
 
180
insert_lock = false
 
181
 
 
182
# If true, ignore leading white spaces of each query while pgpool judges
 
183
# whether the query is a SELECT so that it can be load balanced.  This
 
184
# is useful for certain APIs such as DBI/DBD which is known to adding an
 
185
# extra leading white space.
 
186
ignore_leading_white_space = true
 
187
 
 
188
# If true, print all statements to the log.  Like the log_statement option
 
189
# to PostgreSQL, this allows for observing queries without engaging in full
 
190
# debugging.
 
191
log_statement = false
 
192
 
 
193
# If true, print all statements to the log. Similar to log_statement except
 
194
# that prints DB node id and backend process id info.
 
195
log_per_node_statement = false
 
196
 
 
197
# If true, incoming connections will be printed to the log.
 
198
log_connections = false
 
199
 
 
200
# If true, hostname will be shown in ps status. Also shown in
 
201
# connection log if log_connections = true.
 
202
# Be warned that this feature will add overhead to look up hostname.
 
203
log_hostname = false
 
204
 
 
205
# if non 0, run in parallel query mode
 
206
parallel_mode = false
 
207
 
 
208
# if non 0, use query cache
 
209
enable_query_cache = false
 
210
 
 
211
#set pgpool2 hostname 
 
212
pgpool2_hostname = ''
 
213
 
 
214
# system DB info
 
215
system_db_hostname = 'localhost'
 
216
system_db_port = 5432
 
217
system_db_dbname = 'pgpool'
 
218
system_db_schema = 'pgpool_catalog'
 
219
system_db_user = 'pgpool'
 
220
system_db_password = ''
 
221
 
 
222
# backend_hostname, backend_port, backend_weight
 
223
# here are examples
 
224
backend_hostname0 = 'host1'
 
225
backend_port0 = 5432
 
226
backend_weight0 = 1
 
227
backend_data_directory0 = '/data'
 
228
backend_hostname1 = 'host2'
 
229
backend_port1 = 5432
 
230
backend_weight1 = 1
 
231
backend_data_directory1 = '/data1'
 
232
 
 
233
# - HBA -
 
234
 
 
235
# If true, use pool_hba.conf for client authentication.
 
236
enable_pool_hba = false
 
237
 
 
238
# - online recovery -
 
239
# online recovery user
 
240
recovery_user = 'nobody'
 
241
 
 
242
# online recovery password
 
243
recovery_password = ''
 
244
 
 
245
# execute a command in first stage.
 
246
recovery_1st_stage_command = ''
 
247
 
 
248
# execute a command in second stage.
 
249
recovery_2nd_stage_command = ''
 
250
 
 
251
# maximum time in seconds to wait for the recovering node's postmaster
 
252
# start-up. 0 means no wait.
 
253
# this is also used as a timer waiting for clients disconnected before
 
254
# starting 2nd stage
 
255
recovery_timeout = 90
 
256
 
 
257
# If client_idle_limit_in_recovery is n (n > 0), the client is forced
 
258
# to be disconnected whenever after n seconds idle (even inside an
 
259
# explicit transactions!) in the second stage of online recovery.
 
260
# n = -1 forces clients to be disconnected immediately.
 
261
# 0 disables this functionality(wait forever).
 
262
# This parameter only takes effect in recovery 2nd stage.
 
263
client_idle_limit_in_recovery = 0
 
264
 
 
265
# Specify table name to lock. This is used when rewriting lo_creat
 
266
# command in replication mode. The table must exist and has writable
 
267
# permission to public. If the table name is '', no rewriting occurs.
 
268
lobj_lock_table = ''
 
269
 
 
270
# If true, enable SSL support for both frontend and backend connections.
 
271
# note that you must also set ssl_key and ssl_cert for SSL to work in
 
272
# the frontend connections.
 
273
ssl = false
 
274
# path to the SSL private key file
 
275
#ssl_key = './server.key'
 
276
# path to the SSL public certificate file
 
277
#ssl_cert = './server.cert'
 
278
 
 
279
# If either ssl_ca_cert or ssl_ca_cert_dir is set, then certificate
 
280
# verification will be performed to establish the authenticity of the
 
281
# certificate.  If neither is set to a nonempty string then no such
 
282
# verification takes place.  ssl_ca_cert should be a path to a single
 
283
# PEM format file containing CA root certificate(s), whereas ssl_ca_cert_dir
 
284
# should be a directory containing such files.  These are analagous to the
 
285
# -CAfile and -CApath options to openssl verify(1), respectively.
 
286
#ssl_ca_cert = ''
 
287
#ssl_ca_cert_dir = ''
 
288
 
 
289
# Debug message verbosity level. 0: no message, 1 <= : more verbose
 
290
debug_level = 0