summaryrefslogtreecommitdiff
path: root/doc/en/pgconfig.html
blob: 9aafdd50f2543e62267a6c65b5d1bb14082d7e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pgpool Setting</title>
<link href="../screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
  <h1><img src="../images/logo.gif" alt="pgpoolAdmin" /></h1>
</div>
<div id="menu">
  <ul>
    <li><a href="../index_en.html">Introduction</a></li>
    <li><a href="install.html">Install</a></li>
    <li><a href="login.html">Login</a></li>
    <li><a href="status.html">pgpool Status</a></li>
    <li><a href="nodeServerStatus.html">Node Status</a></li>
    <li><a href="queryCache.html">Query Cache</a></li>
    <li><a href="systemDb.html">Partitioning Rule</a></li>
    <li><a href="pgconfig.html">pgpool.conf Setting</a></li>
    <li><a href="config.html">pgpoolAdmin Setting</a></li>
    <li><a href="changePassword.html">Change Password</a></li>
    <li><a href="logout.html">Logout</a></li>
    <li><a href="errorCode.html">Error Code</a></li>
  </ul>
</div>
<div id="content">
  <h2>pgpool Setting</h2>
  <h3>Summary</h3>

  The content of pgpool.conf that is the configuration file of pgpool set can be displayed and be changed. 
  <h3>Feature</h3>
  Please input the value that wants to change and push the update button.
  <h3>Addition of A backend host</h3>
  Please push the add button when you want to add a new back end host. <br />
  It inputs in back end host's item and a new input column can be done, and input information on a new back end host there, please.<br />
  Please push the update button when input ends. 
  <h3>Deletion of backend host</h3>

  Please push the delete button at the right of the host setting when you want to delete the back end host who has registered. <br />
  <div id="submenu">
    <h3>Table of Contents</h3>
    <ul>
      <li><a href="#connections">Connections</a></li>
      <li><a href="#backends">Backends</a></li>
      <li><a href="#pcp">PCP</a></li>

      <li><a href="#logging">Logging</a></li>
      <li><a href="#replication">Replication</a></li>
      <li><a href="#health-check">Health Check</a></li>
	  <li><a href="#online-recovery">Online Recovery</a></li>
      <li><a href="#system-database">System Database</a></li>
      <li><a href="#others">Others</a></li>
    </ul>

  </div>
    <h3><a name="connections">Connections</a></h3>
    <table>
      <thead>
        <tr>
          <th>Parameter</th>
          <th>Detail</th>

        </tr>
      </thead>
      <tbody>
        <tr>
          <th><label>Specifies the addresses to listen on for TCP/IP connections</label>
          <br>listen_addresses (string)</th>
          <td>
Specifies the addresses to listen on for TCP/IP connections.  Set to '*' for all configured IP interfaces, '' for no TCP/IP connections, or else to a specific IP address or host name.  The default is 'localhost'.  Note that connections via UNIX domain sockets are always allowed.
          </td>

        </tr>
        <tr>
          <th><label>The port number where pgpool is running on</label>
          <br>port (integer)</th>
          <td>The port number where pgpool is running on. Default value is 9999.</td>
        </tr>
        <tr>

          <th><label>The socket directory pgpool could connect</label>
          <br>socket_dir (string)</th>
          <td>The directory of unix domain socket for PostgreSQL server. Default value is '/tmp'.</td>
        </tr>
        <tr>
          <th><label>Number of pgpool process initially forked</label>
          <br>num_init_children (integer)</th>

          <td>Number of pgpool process initially forked. Default value is 32.</td>
        </tr>
        <tr>
          <th><label>Number of connection pools each pgpool server process are keeping</label>
          <br>max_pool (integer)</th>
          <td>
Number of connection pools each pgpool server process are keeping. pgpool will make a new connection if there's no user name and database name pair yet. Thus it is recommended that max_pool exceeds the number of such that possible pairs. If it exceeds, the oldest connection is discarded and the new connection uses the slot. The default value is 4.
		  </td>

        </tr>
        <tr>
          <th><label>Life of a idle child process in seconds</label>
          <br>child_life_time (integer)</th>
          <td>Life of a idle child process in seconds. This will prevent unwanted memory leaks or other problems. Default is 300. Set it to 0 disables this feature.</td>
        </tr>
        <tr>

          <th><label>Life time for each idle connection in seconds</label>
          <br>connection_life_time (integer)</th>
          <td>Life time for each idle connection in seconds. 0 means the life time is forever. The default value is 0.</td>
        <tr>
          <th><label>If child_max_connections connections were received, child exits</label>
          <br>child_max_connections (integer)</th>

          <td> If child_max_connections connections were received, child exits. 0 means no exit. The default value is 0.</td>
        </tr>
        <tr>
          <th><label>If true, cache connections to PostgreSQL</label>
					<br>connection_cache</th>
          <td>If true, cache connections to PostgreSQL. Default value is true.</td>

        </tr>
        <tr>
          <th><label>Pgpool2 server name where running on</label>
          <br>pgpool2_hostname (string)</th>
		  <td>The host name that pgpool2 runs is specified.</td>
        </tr>
      </tbody>
      <tfoot>

        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
    <h3><a name="backends">Backends</a></h3>
    <table>
      <thead>

        <tr>
          <th>Parameter</th>
          <th>Detail</th>
          <td></td>
        </tr>
      </thead>
      <tbody>
        <tr>

          <th><label>The socket directory PostgreSQL could connect</label>
          <br>backend_socket_dir (string)</th>
          <td>The directory of unix domain socket for PostgreSQL server. Default value is '/tmp'.</td>
        </tr>
        <tr>
		  <th><label>The real PostgreSQL server name pgpool could connect</label><br />backend_hostname (string)</th>

		  <td>The host name that PostgreSQL runs is specified.</td>
        </tr>
		<tr>
          <th><label>The port number where real PostgreSQL server is running on</label><br />backend_port (integer)</th>
		<td>It is a port number that postmaster is running.</td>
      </tr>
      <tr>
        <th><label>Load balance weight when pgpool is running in the state of load balance mode</label><br />backend_weight (integer)</th>

		<td>The weight at the load balance mode is set by the value from 0 to 1. Relative weight is calculated and distributed from the value specified with all the back end servers. </td>
      </tr>
	  </tbody>
    </table>
    <h3><a name="pcp">PCP (pgpool Control Port)</a></h3>
    <table>
      <thead>
        <tr>

          <th>Parameter</th>
          <th>Detail</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th><label>The port number where pcp is running on</label>

          <br>pcp_port (integer)</th>
          <td>It is a port number to connect it with PCP. Default is 9898.</td>
        </tr>
        <tr>
          <th><label>The socket directory pcp could connect</label>
          <br>pcp_socket_dir (string)</th>
		  <td>The directory of unix domain socket for PCP. Default value is '/tmp'.</td>

        </tr>
        <tr>
          <th><label>When there is no response in this time from client, it disconnect and stop</label>
          <br>pcp_timeout (integer)</th>
		  <td>The time-out of the PCP command is set. The connection disconnect when there will not be response in this time. </td>
        </tr>
      </tbody>
      <tfoot>

        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
    <h3><a name="logging">Logging</a></h3>
    <table>
      <thead>

        <tr>
          <th>Parameter</th>
          <th>Detail</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th><label>The directory name to store pgpool&#039;s log files</label>

          <br>logdir (string)</th>
		  <td>The directory name to store pgpool's log files. Currently only a file named pgpool.pid(has pgpool's process id) is stored. The default value for logdir is '/tmp'.</td>
        </tr>
        <tr>
          <th><label>If true timestamp is added to each log line</label>
					<br>print_timestamp</th>
		  <td>If true timestamp is added to each log line. The default value is true.</td>

		</tr>
        <tr>
          <th><label>If true, print all statements to the log</label>

					<br>log_statement</th>
		  <td>If true, print all statements to the log.  Like the log_statement option to PostgreSQL, this allows for observing queries without engaging in full debugging. The default value is false.</td>
		</tr>
        <tr>
          <th><label>If true, incoming connections will be printed to the log. The default value is false.</label>

					<br>log_connections</th>
		  <td>If true, incoming connections will be printed to the log.</td>
		</tr>
        <tr>
          <th><label>If true, client's hostname will be shown in ps status and in a connection log if log_connections is true</label>

					<br>log_hostname</th>
		  <td>If true, incoming client's hostname will be printed in the "ps" command result. Also, if log_connections is enabled, hostname will be printed with a connection log. Be aware that hostname lookup adds some overhead, and may slow down pgpool-II.</td>
		</tr>

      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
    <h3><a name="replication">Replication</a></h3>

    <table>
      <thead>
        <tr>
          <th>Parameter</th>
          <th>Detail</th>
        </tr>
      </thead>
      <tbody>

        <tr>
          <th><label>Set this true if you are going to use replication functionality</label>
					<br>replication_mode</th>
		  <td>Set this true if you are going to use replication functionality. Default is false.</td>
        </tr>
        <tr>
          <th><label>If true, pgpool will wait for the completion of the master query before sending a query to the secondary server</label>

					<br>replication_strict</th>
		  <td>If true, pgpool will wait for the completion of the master query before sending a query to the secondary server. This is the safest and default operating mode for pgpool. Default is true.
</td>
        </tr>
        <tr>
          <th><label>Stop replication mode on data mismatch between master and secondary</label>
					<br>replication_stop_on_mismatch</th>
		  <td>Stop replication mode on data mismatch between master and secondary. Default is false.</td>
		</tr>
        <tr>

          <th><label>Semicolon separated SQL commands to be issued at the end of session</label>
          <br>reset_query_list (string)</th>
		  <td>SQL command to initialize the connection when the session ends is delimited by ";".</td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"></td>

        </tr>
      </tfoot>
    </table>
    <h3><a name="health-check">Health Check</a></h3>
    <table>
      <thead>
        <tr>
          <th>Parameter</th>

          <th>Detail</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th><label>Pgpool does &quot;health check&quot; periodically to detect PostgreSQL servers down, network communication problems or as such</label>

          <br>health_check_timeout (integer)</th>
		  <td>pgpool does "health check" periodically to detect PostgreSQL servers down, network communication problems or as such. If something is going wrong, pgpool will automatically run into fail over or degeneration mode.</td>
        </tr>
        <tr>
          <th><label>Specifies the interval for next health checking. 0 means no health checking</label>
          <br>health_check_period (integer)</th>
		  <td>Specifies the interval for next health checking. 0 means no health checking. The default is 0(i.e. no health checking).</td>

        </tr>
        <tr>
          <th><label>PostgreSQL user name for the health checking</label>
          <br>health_check_user (string)</th>
		  <td>PostgreSQL user name for the health checking.</td>
        </tr>
      </tbody>

      <tfoot>
        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
    <h3><a name="online-recovery">Online Recovery</a></h3>
    <table>
      <thead>
        <tr>
          <th>Parameter</th>
          <th>Detail</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th><label>PostgreSQL user name for online recovery</label>
          <br>recovery_user (string)</th>
		  <td>A PostgreSQL user name to be used during online recovery process.</td>
        </tr>
        <tr>
          <th><label>PostgreSQL user password for online recovery</label>
          <br>recovery_password (string)</th>
		  <td>"recovery_user"'s password to be used during online recovery process.</td>
        </tr>
        <tr>
          <th><label>Recovery command to be excuted on the first stage</label>
          <br>recovery_1st_stage_command (string)</th>
		  <td>Specifies a script name to be executed for the first stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA)</td>
        </tr>
        <tr>
          <th><label>Recovery command to be excuted on the second stage</label>
          <br>recovery_2nd_stage_command (string)</th>
		  <td>Specifies a script name to be executed for the second stage of an online recovery process. The script needs to be placed in master node's database cluster ($PGDATA</td>
        </tr>
        <tr>
          <th><label>Number of seconds to wait for online recovery to complete. 0 means no wait</label>
          <br>recovery_timeout (integer)</th>
		  <td>Number of seconds to wait for online recovery to complete. Note that 0 means NO WAIT; not no timeout.</td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
    <h3><a name="system-database">System Database</a></h3>
    <table>

      <thead>
        <tr>
          <th>Parameter</th>
          <th>Detail</th>
        </tr>
      </thead>
      <tbody>
        <tr>

          <th><label>The server name system database running on</label>
          <br>system_db_hostname (string)</th>
		  <td>The host name that system DB is operating is specified. It connects with Unix domain socket when not specifying it. </td>
        </tr>
        <tr>
          <th><label>The port number system database could connect</label>
          <br>system_db_port (integer)</th>

		  <td>The port number to connect system DB is specified.</td>
        </tr>
        <tr>
          <th><label>The database name of system database</label>
          <br>system_db_dbname (string)</th>
		  <td>The data base name of system DB is specified. </td>
        </tr>
        <tr>
          <th><label>The schema name of system database</label>
          <br>system_db_schema (string)</th>
		  <td>The schema name of system DB is specified. </td>
        </tr>
        <tr>
          <th><label>The username when connection system database</label>
          <br>system_db_user (string)</th>
		  <td>The username connected with system DB is specified.</td>
        </tr>
        <tr>
          <th><label>The password of system database who connects system database</label>
          <br>system_db_password (string)</th>
		  <td>The password connected with system DB is specified.</td>
        </tr>
      </tbody>

      <tfoot>
        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
    <h3><a name="others">Others</a></h3>
    <table>

      <thead>
        <tr>
          <th>Parameter</th>
          <th>Detail</th>
        </tr>
      </thead>
      <tbody>
        <tr>

          <th><label>Perform load balancing for SELECT</label>
					<br>load_balance_mode</th>
		  <td>Perform load balancing for SELECT. Default is false.</td>
		</tr>
        <tr>
          <th><label>Run in master/slave mode</label>
					<br>master_slave_mode</th>

		  <td>Run in master/slave mode. See 14 for more details. Default value is false. This mode is not compatible with replication_mode.</td>
		</tr>
        <tr>
          <th><label> If you replicate a table having SERIAL data type column, sometimes the serial value does not match between servers</label>
					<br>insert_lock</th>
		  <td>
If you replicate a table having SERIAL data type column, sometimes the serial value does not match between servers. You can avoid the problem by using a table lock (with a performance penalty due to
less currency in transactions). For this you need to rewrite you query:

<p>
INSERT INTO ....
</p>
<p>
to:
</p>
<p>
BEGIN;<br />
LOCK TABLE ...<br />
INSERT INTO ...<br />
COMMIT;
</p>
<p>
This is painfull. If you turn on insert_lock, pgpool will
automatically do the rewriting for you.

</p>
		  </td>
		</tr>
        <tr>
          <th><label>If true, ignore leading white spaces of each query while pgpool judges if the query is a SELECT so that it can be load balanced</label>
					<br>ignore_leading_white_space</th>
		  <td>If true, ignore leading white spaces of each query while pgpool judges if the query is a SELECT so that it can be load balanced. This is usefull for certain APIs such as DBI/DBD which is
   know as adding an extra leading white space.</td>
		</tr>

        <tr>
          <th><label>Run in parallel mode</label>
					<br>parallel_mode</th>
		  <td>If true, pgpool runs in parallel mode. You must define partitioning rules to use parallel mode.</td>
		</tr>
        <tr>
          <th><label>Perform query cache</label>
					<br>enable_query_cache</th>
		  <td>If true, allow pgpool to cache SELECT query results.</td>
		</tr>
        <tr>
          <th><label>Use host-based authentication (HBA)',</label>
					<br>enable_pool_hba</th>
		  <td>If true, incoming clients are authenticated based on the configuration written in pool_hba.conf.</td>
		</tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"></td>
        </tr>
      </tfoot>
    </table>
</div>

<hr class="hidden" />
<div id="footer">
  <address>
  Version 2.1<br />
  Copyright &copy; 2006 - 2008 <a href="http://pgpool.projects.postgresql.org/">pgpool Global Development Group</a>. All rights reserved.
  </address></div>
</body>
</html>