pgpool-II 4.3.13 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 5. Server Configuration | Next |
All parameter names are case-insensitive. Every parameter takes a value of one of five types: boolean, string, integer, floating point, or enumerated (enum). The type determines the syntax for setting the parameter:
Boolean: Values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of one of these.
String: In general, enclose the value in single quotes, doubling any single quotes within the value. Quotes can usually be omitted if the value is a simple number or identifier, however.
Numeric (integer and floating point): A decimal point is permitted only for floating-point parameters. Do not use thousands separators. Quotes are not required.
Numeric with Unit: The numeric parameters that describe the quantities of memory or time have an implicit unit. The unit might be kilobytes, megabytes, milliseconds, seconds, or minutes. For example:
search_primary_node_timeout = 6min memqcache_total_size = 64MB
An unadorned numeric value for one of these settings will use the parameter's default unit.
The unit name is case-sensitive, and there can be whitespace between the numeric value and the unit.
Valid memory units are kB (kilobytes), MB (megabytes), GB (gigabytes), and TB (terabytes).
Valid time units are ms (milliseconds), s (seconds), min (minutes), h (hours), and d (days).
Enumerated: Enumerated-type parameters are written in the same way as string parameters, but are restricted to have one of a limited set of values. Enum parameter values are case-insensitive.
The most fundamental way to set these parameters is to edit the file pgpool.conf, which is located in $prefix/etc/pgpool.conf, if it installed from source code. An example of what this file might look like is:
# This is a comment listen_addresses = 'localhost' port = 9999 serialize_accept = off reset_query_list = 'ABORT; DISCARD ALL'
One parameter is specified per line. The equal sign between name and value is optional. Whitespace is insignificant (except within a quoted parameter value) and blank lines are ignored. Hash marks (#) designate the remainder of the line as a comment. Parameter values that are not simple identifiers or numbers must be single-quoted. To embed a single quote in a parameter value, write either two quotes (preferred) or backslash-quote.
Parameters set in this way provide default values for the cluster. The settings seen by active sessions will be these values unless they are overridden. The following sections describe ways in which the administrator or user can override these defaults.
The configuration file is reread whenever the main server process receives a SIGHUP signal; this signal is most easily sent by running pgpool reload from the command line. The main pgpool process also propagates this signal to all its child processes, so that next sessions also adopt the new values. Some parameters can only be set at server start; any changes to their entries in the configuration file will be ignored until the server is restarted. Invalid parameter settings in the configuration file are likewise ignored (but logged) during SIGHUP processing.
Pgpool-II provides a feature for breaking down pgpool.conf files into sub-files. This feature is especially useful when managing multiple servers or dividing by features. include directive can be used like this:
include = 'filename'
If the file name is not an absolute path, it is taken as relative to the directory containing the referencing configuration file. Inclusions can be nested.
Pgpool-II also provides two SQL style commands to interact with session-local configuration settings.
The PGPOOL SHOW command allows inspection of the current value of all parameters.
The PGPOOL SET command allows modification of the current value of those parameters that can be set locally to a session; it has no effect on other sessions.