pgpool2.git / summary / log / commit / refs

commit    e680b737ee3ba068bd6d98f9fdf210c52eceeb35
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Thu May 26 05:35:37 2016 +0000

    Add more sections to runtime.sgml.


doc/src/sgml/HTML.index | 28 +++- doc/src/sgml/bookindex.sgml | 24 ++++ doc/src/sgml/runtime.sgml | 320 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 301 insertions(+), 71 deletions(-) diff --git a/doc/src/sgml/HTML.index b/doc/src/sgml/HTML.index index 9845c010e..fae6d5fb9 100644 --- a/doc/src/sgml/HTML.index +++ b/doc/src/sgml/HTML.index @@ -69,8 +69,32 @@ TITLE Configuring pgpool significance NORMAL PRIMARY pgpool-II configuration /INDEXTERM +INDEXTERM configuring-backend-info.html#BACKEND-INFO +INDEXPOINT configuring-backend-info.html#AEN430 +TITLE Backend information +significance NORMAL +PRIMARY backend_hostname configuration parameter +/INDEXTERM +INDEXTERM configuring-backend-info.html#BACKEND-INFO +INDEXPOINT configuring-backend-info.html#AEN448 +TITLE Backend information +significance NORMAL +PRIMARY backend_port configuration parameter +/INDEXTERM +INDEXTERM configuring-backend-info.html#BACKEND-INFO +INDEXPOINT configuring-backend-info.html#AEN460 +TITLE Backend information +significance NORMAL +PRIMARY backend_data_directory configuration parameter +/INDEXTERM +INDEXTERM configuring-backend-info.html#BACKEND-INFO +INDEXPOINT configuring-backend-info.html#AEN472 +TITLE Backend information +significance NORMAL +PRIMARY backend_flag configuration parameter +/INDEXTERM INDEXTERM pcp-common-options.html -INDEXPOINT pcp-common-options.html#AEN441 +INDEXPOINT pcp-common-options.html#AEN521 TITLE pcp_common_options significance NORMAL ZONE pcp-common-options.html @@ -78,7 +102,7 @@ TITLE pcp_common_options PRIMARY pcp_common_options /INDEXTERM INDEXTERM pcp-node-count.html -INDEXPOINT pcp-node-count.html#AEN541 +INDEXPOINT pcp-node-count.html#AEN621 TITLE pcp_node_count significance NORMAL ZONE pcp-node-count.html diff --git a/doc/src/sgml/bookindex.sgml b/doc/src/sgml/bookindex.sgml index fbebac270..64381cbf5 100644 --- a/doc/src/sgml/bookindex.sgml +++ b/doc/src/sgml/bookindex.sgml @@ -21,6 +21,30 @@ <indexdiv><title>B</title> +<indexentry> + <primaryie>backend_data_directory configuration parameter, + <ulink url="configuring-backend-info.html#BACKEND-INFO" role="AEN460">Backend information</ulink> + </primaryie> +</indexentry> + +<indexentry> + <primaryie>backend_flag configuration parameter, + <ulink url="configuring-backend-info.html#BACKEND-INFO" role="AEN472">Backend information</ulink> + </primaryie> +</indexentry> + +<indexentry> + <primaryie>backend_hostname configuration parameter, + <ulink url="configuring-backend-info.html#BACKEND-INFO" role="AEN430">Backend information</ulink> + </primaryie> +</indexentry> + +<indexentry> + <primaryie>backend_port configuration parameter, + <ulink url="configuring-backend-info.html#BACKEND-INFO" role="AEN448">Backend information</ulink> + </primaryie> +</indexentry> + <indexentry> <primaryie>bison, <ulink url="install-requirements.html" role="AEN221">Requirements</ulink> diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index fcaf70b96..3fecb385f 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -94,80 +94,262 @@ acbd18db4cc2f85cedef654fccc4a4d8 <primary>pgpool-II configuration</primary> </indexterm> - <sect2 id="configuring-pgpool-conf"> - <title>Configuring pgpool.conf</title> - - <para> - <filename>pgpool.conf</filename> is the main configuration file - of <productname>pgpool-II</productname>. You need to specify the - path to the file when - starting <productname>pgpool-II</productname> - using <option>-f</option> option. - <filename>pgpool.conf</filename> is located - at <filename>$prefix/etc/pgpool.conf</filename> by default. - </para> - </sect2> - - <sect2 id="running-mode"> - <title>Running mode of pgpool-II</title> - - <para> - There are four different running modes in pgpool-II: streaming - replication mode, master slave mode, native replication mode and - raw mode. In any mode, pgpool-II provides connection pooling, - automatic fail over and online recovery. The sample configuration - files for each mode are provied. They are located - under <filename>$prefix/etc</filename>. You can copy one of them - to <filename>$prefix/etc/pgpool.conf</filename>. - </para> - - <para> - Those modes are exclusive each other and cannot be changed after - starting the server. You should make a decision which to use in - the early stage of designing the system. If you are not sure, it - is recommended to use the streaming replication mode. - </para> - - <para> - The streaming replication mode can be used with PostgreSQL servers - operating streaming replication. In this mode, PostgreSQL is - responsible for synchronizing databases. This mode is widely used - and most recommended way to use pgpool-II. Load balancing is - possible in the mode. The sample configuration file - is <filename>$prefix/etc/pgpool.conf.sample-stream</filename>. - </para> - - <para> - The master slave mode mode can be used with PostgreSQL servers - operating Slony. In this mode, PostgreSQL is responsible for - synchronizing databases. This Slony is being obsoletd by streaming - replication, we do not recommend to use this mode unless you have - specific reason to use Slony. Load balancing is possible in the - mode. The sample configuration file - is <filename>$prefix/etc/pgpool.conf.sample-master-slave</filename>. - </para> + <sect2 id="configuring-pgpool-conf"> + <title>Configuring pgpool.conf</title> + + <para> + <filename>pgpool.conf</filename> is the main configuration file + of <productname>pgpool-II</productname>. You need to specify the + path to the file when + starting <productname>pgpool-II</productname> + using <option>-f</option> option. + <filename>pgpool.conf</filename> is located + at <filename>$prefix/etc/pgpool.conf</filename> by default. + </para> + </sect2> + + <sect2 id="running-mode"> + <title>Running mode of pgpool-II</title> + + <para> + There are four different running modes in pgpool-II: streaming + replication mode, master slave mode, native replication mode and + raw mode. In any mode, pgpool-II provides connection pooling, + automatic fail over and online recovery. The sample configuration + files for each mode are provied. They are located + under <filename>$prefix/etc</filename>. You can copy one of them + to <filename>$prefix/etc/pgpool.conf</filename>. + </para> + + <para> + Those modes are exclusive each other and cannot be changed after + starting the server. You should make a decision which to use in + the early stage of designing the system. If you are not sure, it + is recommended to use the streaming replication mode. + </para> + + <para> + The streaming replication mode can be used with PostgreSQL servers + operating streaming replication. In this mode, PostgreSQL is + responsible for synchronizing databases. This mode is widely used + and most recommended way to use pgpool-II. Load balancing is + possible in the mode. The sample configuration file + is <filename>$prefix/etc/pgpool.conf.sample-stream</filename>. + </para> + + <para> + The master slave mode mode can be used with PostgreSQL servers + operating Slony. In this mode, PostgreSQL is responsible for + synchronizing databases. This Slony is being obsoletd by streaming + replication, we do not recommend to use this mode unless you have + specific reason to use Slony. Load balancing is possible in the + mode. The sample configuration file + is <filename>$prefix/etc/pgpool.conf.sample-master-slave</filename>. + </para> + + <para> + In the native replication mode, pgpool-II is responsible for + synchronizing databases. The advantage for the mode is the + synchronization is done in synchronous way: writing to the + database does not return until all of PostgreSQL servers finish + the write operation. Note, however, read snapshot control is not + done and consistent visibility is not guaranteed in the mode. + Load balancing is possible in the mode. The sample configuration + file <filename>$prefix/etc/pgpool.conf.sample-replication</filename>. + </para> + + <para> + In the raw mode, pgpool-II does not care about the database + synchronization. It's user's responsibility to make the whole + system does a meaningfull thing. Load balancing + is <emphasis>not</emphasis> possible in the mode. The sample + configuration + file <filename>$prefix/etc/pgpool.conf.sample</filename>. + </para> + </sect2> + </sect1> - <para> - In the native replication mode, pgpool-II is responsible for - synchronizing databases. The advantage for the mode is the - synchronization is done in synchronous way: writing to the - database does not return until all of PostgreSQL servers finish - the write operation. Note, however, read snapshot control is not - done and consistent visibility is not guaranteed in the mode. - Load balancing is possible in the mode. The sample configuration - file <filename>$prefix/etc/pgpool.conf.sample-replication</filename>. - </para> + <sect1 id="configuring-backend-info"> + <title>Configuring backend information</title> <para> - In the raw mode, pgpool-II does not care about the database - synchronization. It's user's responsibility to make the whole - system does a meaningfull thing. Load balancing - is <emphasis>not</emphasis> possible in the mode. The sample - configuration - file <filename>$prefix/etc/pgpool.conf.sample</filename>. + For <productname>pgpool-II</productname> to recognize PostgreSQL + backend servers, you need to configure <varname>backend*</varname> + in <filename>pgpool.conf</filename>. For starters, at + least <xref linkend="guc-backend-hostname"> + and <xref linkend="guc-backend-port"> paramters are required to + set up to start <productname>pgpool-II</productname> server. </para> - </sect2> + <sect2 id="backend-info"> + <title>Backend information</title> + + <variablelist> + + <varlistentry id="guc-backend-hostname" xreflabel="backend_hostname"> + <term><varname>backend_hostname</varname> (<type>string</type>) + <indexterm> + <primary><varname>backend_hostname</varname> configuration parameter</primary> + </indexterm> + </term> + + <listitem> + <para> + <varname>backend_hostname</varname> specifies where to + connect to the <productname>PostgreSQL</productname> + backend. It is used + by <productname>pgpool-II</productname> to communicate + with the server. + </para> + + <para> + For TCP/IP communication, this parameter can take a hostname + or an IP address. If this begins with a slash, it specifies + Unix-domain communication rather than TCP/IP; the value is + the name of the directory in which the socket file is + stored. The default behavior when backend_hostname is empty + ('') is to connect to a Unix-domain socket in /tmp. + </para> + + <para> + Multiple backends can be specified by adding a number at the + end of the parameter name (e.g.backend_hostname0). This + number is referred to as "DB node ID", and it starts from + 0. The backend which was given the DB node ID of 0 will be + called "Master DB". When multiple backends are defined, the + service can be continued even if the Master DB is down (not + true in some modes). In this case, the youngest DB node ID + alive will be the new Master DB. + </para> + + <para> + Please note that the DB node which has id 0 has no special + meaning if operated in streaming replication mode. Rather, + you should care about if the DB node is the "primary node" or + not. See Streaming Replication for more details. + </para> + + <para> + If you plan to use only one PostgreSQL server, specify it by + backend_hostname0. + </para> + + <para> + New nodes can be added in this parameter by reloading a + configuration file. However, values cannot be updated so + you must restart <productname>pgpool-II</productname> in + that case. + </para> + + </listitem> + + </varlistentry> + + <varlistentry id="guc-backend-port" xreflabel="backend_port"> + <term><varname>backend_port</varname> (<type>integer</type>) + <indexterm> + <primary><varname>backend_port</varname> configuration parameter</primary> + </indexterm> + </term> + + <listitem> + <para> + <varname>backend_port</varname> specifies the port number + of the backends. Multiple backends can be specified by + adding a number at the end of the parameter name + (e.g. backend_port0). If you plan to use only one + PostgreSQL server, specify it by backend_port0. + </para> + <para> + New backend ports can be added in this parameter by + reloading a configuration file. However, values cannot be + updated so you must + restart <productname>pgpool-II</productname> in that case. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-backend-data-directory" xreflabel="backend_data_directory"> + <term><varname>backend_data_directory</varname> (<type>string</type>) + <indexterm> + <primary><varname>backend_data_directory</varname> configuration parameter</primary> + </indexterm> + </term> + + <listitem> + <para> + <varname>backend_data_directory</varname> specifies the + database directory. Multiple backends can be + specified by adding a number at the end of the parameter + name (e.g. backend_data_directory0). If you plan to use + only one PostgreSQL server, specify it by + backend_data_directory0. + </para> + <para> + New backend data_directorys can be added in this parameter + by reloading a configuration file. However, values cannot + be updated so you must + restart <productname>pgpool-II</productname> in that case. + </para> + </listitem> + </varlistentry> + + <varlistentry id="guc-backend-flag" xreflabel="backend_flag"> + <term><varname>backend_flag</varname> (<type>string</type>) + <indexterm> + <primary><varname>backend_flag</varname> configuration parameter</primary> + </indexterm> + </term> + + <listitem> + <para> + <varname>backend_flag</varname> controls various backend + behavior. Multiple backends can be specified by adding a + number at the end of the parameter name + (e.g. backend_flag0). If you plan to use only one + PostgreSQL server, specify it by backend_flag0. + </para> + <para> + New backend flags can be added in this parameter by + reloading a configuration file. Currently followings are + allowed. Multiple flags can be specified by using "|". + </para> + + <table id="backend-flag-table"> + <title>Backend flags</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Flag</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>ALLOW_TO_FAILOVER</literal></entry> + <entry>Allow to failover or detaching backend. This + is the default. You cannot specify with + DISALLOW_TO_FAILOVER at a same time.</entry> + </row> + <row> + <entry><literal>DISALLOW_TO_FAILOVER</literal></entry> + <entry>This is useful when you protect backend by + using HA (High Availability) softwares such as + Heartbeat or Pacemaker. You cannot specify with + ALLOW_TO_FAILOVER at a same time. + </entry> + </row> + </tbody> + </tgroup> + </table> + + </listitem> + </varlistentry> + + </variablelist> + + </sect2> </sect1> [parent: c1eb6f42b66a]