Setting Parameters
pgpool-II 3.6.3 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 5. Server Configuration | Next |
5.1.1. Parameter Names and Values
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.
-
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.
5.1.2. Parameter Interaction via the Configuration File
The most fundamental way to set these parameters is to edit the file pgpool.conf , which is located in $prefix/etc/pgpool.conf . 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 existing 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.
5.1.3. Parameter Interaction via SQL Clients
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.