</para>
</sect2>
- <sect2 id="runtime-config-slony-mode">
- <title>Slonyモード</title>
-
- <para>
- このモードでは<productname>Pgpool-II</productname>を<acronym>Slony-I</acronym>と組み合わせて使用します。
- Slony-Iが実際にデータのレプリケーションを行います。
- このモードを有効にするには<varname>backend_clustering_mode</varname>にslonyを設定してください。
- <programlisting>
-backend_clustering_mode = slony
- </programlisting>
- このモードでは127台までのレプリカサーバを使用できます。
- また、レプリカサーバをまったく使用しないことも可能です。
- </para>
- <para>
- このモードの難点は、検索問い合わせを負荷分散させた時に、スタンバイサーバのレプリケーション遅延を意識しなければならない点です。
- ノードをまたがる可視性の一貫性も保証されません。
- また、DDLやラージオブジェクトなど、一部のデータオブジェクトはレプリケーションされません。
- </para>
- <para>
- ストリーミングレプリケーションやロジカルレプリケーションが登場後、Slony-Iを新規に採用するシステムは少ないので、特に理由がない限りこのモードを使用することはお勧めしません。
- </para>
- </sect2>
-
<sect2 id="guc-raw-mode" xreflabel="rawモード">
<title>rawモード</title>
<para>
<para>
<productname>Pgpool-II</productname>のSELECTクエリの負荷分散はrawモードを除くすべてのクラスタリングモードで動作します。
- æ\9c\89å\8a¹æ\99\82ã\80\81<productname>Pgpool-II</productname>ã\81¯æ\9b´æ\96°ã\82\92ä¼´ã\81\86ã\82¯ã\82¨ã\83ªã\82\92ã\80\81ã\82¹ã\83\88ã\83ªã\83¼ã\83\9fã\83³ã\82°ã\83¬ã\83\97ã\83ªã\82±ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\80\81ã\83ã\82¸ã\82«ã\83«ã\83¬ã\83\97ã\83ªã\82±ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\80\81Slonyã\83¢ã\83¼ã\83\89ã\81§ã\81¯<acronym>ã\83\97ã\83©ã\82¤ã\83\9eã\83ªã\83\8eã\83¼ã\83\89</acronym>ã\81«ã\80\81ã\83¬ã\83\97ã\83ªã\82±ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\81§ã\81¯å\85¨ã\81¦ã\81®ã\83\90ã\83\83ã\82¯ã\82¨ã\83³ã\83\89ã\83\8eã\83¼ã\83\89ã\81«å¯¾ã\81\97é\80\81ä¿¡ã\81\97ã\81¾ã\81\99ã\80\82
+ 有効時、<productname>Pgpool-II</productname>は更新を伴うクエリを、ストリーミングレプリケーションモード、ロジカルレプリケーションモードでは<acronym>プライマリノード</acronym>に、レプリケーションモードでは全てのバックエンドノードに対し送信します。
そして、その他のクエリは全てのバックエンドの間で負荷分散されます。
<xref linkend="guc-statement-level-load-balance">が指定されている場合を除き、負荷分散メカニズムが参照クエリをどのノードに送信するかはセッション開始時に決められ、セッションの終了まで変更されません。
ただし、いくつかの例外があります。
<sect1 id="read-query-load-balancing">
<title>読み出しクエリの負荷分散</title>
<para>
- 複数の<productname>PostgreSQL</productname>ノードがあり、<productname>Pgpool-II</productname>がストリーミングレプリケーションモード、ロジカルレプリケーションモード、slonyモード、レプリケーションモードで動作していると(これらの動作モードについては<xref linkend="running-mode">を参照のこと)、読み出しクエリをこれらのデータベースノードに分散させ、各々のノードにより少ない数のクエリを処理させることによってより高いスループットを得ることができます。
+ 複数の<productname>PostgreSQL</productname>ノードがあり、<productname>Pgpool-II</productname>がストリーミングレプリケーションモード、ロジカルレプリケーションモード、レプリケーションモードで動作していると(これらの動作モードについては<xref linkend="running-mode">を参照のこと)、読み出しクエリをこれらのデータベースノードに分散させ、各々のノードにより少ない数のクエリを処理させることによってより高いスループットを得ることができます。
この機能を使うためには、<xref linkend="guc-load-balance-mode">をonにする必要があります。
</para>
In other mode, including Slony mode, large
objects are not supported.
-->
- Slonyモードも含め、その他のモードではラージオブジェクトはサポートされていません。
+ その他のモードではラージオブジェクトはサポートされていません。
</para>
</listitem>
</varlistentry>
<entry>ロジカルレプリケーションモード</entry>
<entry><literal>logical_replication</literal> </entry>
</row>
- <row>
- <entry>slonyモード</entry>
- <entry><literal>slony</literal></entry>
- </row>
<row>
<entry>スナップショットアイソレーションモード</entry>
<entry><literal>snapshot_isolation</literal></entry>
</indexterm>
<para>
- <productname>Pgpool-II</>ã\81«ã\81¯ã\82¹ã\83\88ã\83ªã\83¼ã\83\9fã\83³ã\82°ã\83¬ã\83\97ã\83ªã\82±ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\80\81ã\83ã\82¸ã\82«ã\83«ã\83¬ã\83\97ã\83ªã\82±ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\80\81ã\83¡ã\82¤ã\83³ã\83¬ã\83\97ã\83ªã\82«ã\83¢ã\83¼ã\83\89(Slonyã\83¢ã\83¼ã\83\89)ã\80\81ã\83\8dã\82¤ã\83\86ã\82£ã\83\96ã\83¬ã\83\97ã\83ªã\82±ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\80\81ã\82¹ã\83\8aã\83\83ã\83\97ã\82·ã\83§ã\83\83ã\83\88ã\82¢ã\82¤ã\82½ã\83¬ã\83¼ã\82·ã\83§ã\83³ã\83¢ã\83¼ã\83\89ã\80\81rawã\83¢ã\83¼ã\83\89ã\81®6ã\81¤ã\81®<link linkend="guc-backend-clustering-mode">ã\82¯ã\83©ã\82¹ã\82¿ã\83ªã\83³ã\82°ã\83¢ã\83¼ã\83\89</link>ã\81\8cã\81\82ã\82\8aã\81¾ã\81\99ã\80\82
+ <productname>Pgpool-II</>にはストリーミングレプリケーションモード、ロジカルレプリケーションモード、ネイティブレプリケーションモード、スナップショットアイソレーションモード、rawモードの6つの<link linkend="guc-backend-clustering-mode">クラスタリングモード</link>があります。
いずれのモードにおいても、<productname>Pgpool-II</>はコネクションプーリング、自動フェイルオーバの機能を提供します。
ストリーミングレプリケーションモード、ネイティブレプリケーションモード、スナップショットアイソレーションモードでは、更新処理を受け付けながらデータベースノードの同期を取り直すオンラインリカバリが利用可能です。
オンラインリカバリの詳細については<xref linkend="runtime-online-recovery">を参照してください。
このことは、テーブルがレプリケーションされていない場合には、<productname>Pgpool-II</>がサブスクライバー側の更新されていない古いテーブルを見てしまうかもしれないことを意味します。
</para>
- <para>
- <!--
- The <firstterm>native replication mode</firstterm> mode (slony mode)
- can be used with <productname>PostgreSQL</> servers
- operating <productname>Slony</>. In this
- mode, <productname>Slony</>/<productname>PostgreSQL</> is
- responsible for synchronizing
- databases. Since <productname>Slony-I</> is being obsoleted by
- streaming replication, we do not recommend to use this mode
- unless you have specific reason to
- use <productname>Slony</>. Load balancing is possible in the
- mode.
- -->
- <firstterm>メインレプリカモード</firstterm>(slonyモード)は<productname>Slony-I</>を使用する<productname>PostgreSQL</>サーバと一緒に使うことができます。
- このモードでは、<productname>Slony</>/<productname>PostgreSQL</>がデータベースを同期する責任を持ちます。
- <productname>Slony</>はストリーミングレプリケーションの登場により廃れつつあるため、<productname>Slony</>を使う特別な理由が無い限りこのモードの使用を推奨しません。
- このモードでは負荷分散が可能です。
- </para>
-
-
<para>
<!--
In the raw mode, <productname>Pgpool-II</> does not care about the database
</sect2>
- <sect2 id="runtime-config-slony-mode">
- <title>Slony mode</title>
-
- <para>
- This mode is used to couple <productname>Pgpool-II</productname>
- with <acronym>Slony-I</acronym>. Slony-I is responsible for doing
- the actual data replication. To enable this mode, use slony for
- <varname>backend_clustering_mode</varname>.
- <programlisting>
-backend_clustering_mode = slony
- </programlisting>
- In this mode you can have up to 127 replica servers. Also it is
- possible not to have replica server at all.
- </para>
-
- <para>
- The drawback of this mode is, it is necessary to consider the
- replication delay while distributing read queries. The visibility
- consistency among nodes is not guaranteed either. Also certain
- kind of objects such as DDL and large objects are not replicated.
- </para>
-
- <para>
- After streaming replication and logical replication are introduced,
- there are few systems that employ Slony-I. If there's no
- particular reason, it is not recommended to use this mode.
- </para>
- </sect2>
-
<sect2 id="guc-raw-mode" xreflabel="raw mode">
<title>Raw mode</title>
<para>
<para>
If there are multiple <productname>PostgreSQL</productname>
nodes and <productname>Pgpool-II</productname> operates in
- streaming replication mode, logical replication mode, slony mode
+ streaming replication mode, logical replication mode,
or replication mode (for those running mode
see <xref linkend="running-mode"> for more details), it is
possible to distribute read queries among those database nodes
Specifies the running mode. <replaceable>mode</replaceable>
can be <literal>r</literal> (native replication mode), <literal>s</literal> (streaming replication mode),
<literal>n</literal> (raw mode), <literal>l</literal>
- (logical replication mode), <literal>y</literal> (slony mode) or <literal>i</literal> (snapshot isolation mode). If this is
+ (logical replication mode), or <literal>i</literal> (snapshot isolation mode). If this is
omitted, <literal>s</literal> is assumed.
</para>
</listitem>
supported, however.
</para>
<para>
- In other mode, including Slony mode, large
+ In other mode, large
objects are not supported.
</para>
</listitem>
<entry>Logical replication mode</entry>
<entry><literal>logical_replication</literal> </entry>
</row>
- <row>
- <entry>Slony mode</entry>
- <entry><literal>slony</literal></entry>
- </row>
<row>
<entry>Snapshot isolation mode</entry>
<entry><literal>snapshot_isolation</literal></entry>
<para>
There are six different <link linkend="guc-backend-clustering-mode">clustering modes</link> in
<productname>Pgpool-II</>: streaming replication mode, logical
- replication mode, main replica mode (slony mode), native
+ replication mode, native
replication mode, raw mode and snapshot isolation mode. In any
mode, <productname>Pgpool-II</> provides connection pooling, and
automatic fail over. Online recovery can be used only with
in the subscriber side.
</para>
- <para>
- The <firstterm>main replica mode</firstterm> (slony mode)
- can be used with <productname>PostgreSQL</> servers
- operating <productname>Slony</>. In this
- mode, <productname>Slony</>/<productname>PostgreSQL</> is
- responsible for synchronizing
- databases. Since <productname>Slony-I</> is being obsoleted by
- streaming replication, we do not recommend to use this mode
- unless you have specific reason to
- use <productname>Slony</>. Load balancing is possible in the
- mode.
- </para>
-
<para>
In the <firstterm>raw
mode</firstterm>, <productname>Pgpool-II</> does not care about
{"streaming_replication", CM_STREAMING_REPLICATION, false},
{"native_replication", CM_NATIVE_REPLICATION, false},
{"logical_replication", CM_LOGICAL_REPLICATION, false},
- {"slony", CM_SLONY, false},
{"raw", CM_RAW, false},
{"snapshot_isolation", CM_SNAPSHOT_ISOLATION, false},
{NULL, 0, false}
/*
* Decide the backend node to be sent in streaming replication mode, logical
- * replication mode and slony mode. Called by pool_where_to_send.
+ * replication mode. Called by pool_where_to_send.
*/
static void
where_to_send_main_replica(POOL_QUERY_CONTEXT *query_context, char *query, Node *node)
#define REPLICATION (pool_config->backend_clustering_mode == CM_NATIVE_REPLICATION || \
pool_config->backend_clustering_mode == CM_SNAPSHOT_ISOLATION)
#define MAIN_REPLICA (pool_config->backend_clustering_mode == CM_STREAMING_REPLICATION || \
- pool_config->backend_clustering_mode == CM_LOGICAL_REPLICATION || \
- pool_config->backend_clustering_mode == CM_SLONY)
+ pool_config->backend_clustering_mode == CM_LOGICAL_REPLICATION)
#define STREAM (pool_config->backend_clustering_mode == CM_STREAMING_REPLICATION)
#define LOGICAL (pool_config->backend_clustering_mode == CM_LOGICAL_REPLICATION)
-#define SLONY (pool_config->backend_clustering_mode == CM_SLONY)
#define RAW_MODE (pool_config->backend_clustering_mode == CM_RAW)
#define SL_MODE (STREAM || LOGICAL) /* streaming or logical replication mode */
PM_STRATEGY_LAZY
} ProcessManagementSstrategies;
-typedef enum NativeReplicationSubModes
-{
- SLONY_MODE = 1,
- STREAM_MODE,
- LOGICAL_MODE
-} NativeReplicationSubModes;
-
typedef enum ClusteringModes
{
CM_STREAMING_REPLICATION = 1,
CM_NATIVE_REPLICATION,
CM_LOGICAL_REPLICATION,
- CM_SLONY,
CM_RAW,
CM_SNAPSHOT_ISOLATION
} ClusteringModes;
}
}
- if (REPLICATION || SLONY)
+ if (REPLICATION)
{
/*
* We must synchronize because Parse message acquires table locks.
#------------------------------------------------------------------------------
# BACKEND CLUSTERING MODE
# Choose one of: streaming_replication, native_replication,
-# logical_replication, slony, raw or snapshot_isolation
+# logical_replication, raw or snapshot_isolation
# (change requires restart)
#------------------------------------------------------------------------------
# -m r: create an installation as native replication mode.
# -m n: create an installation as raw mode.
# -m l: create an installation as logical replication mode.
-# -m y: create an installation as slony mode.
# -m i: create an installation as snapshot isolation mode.
# -n num_clusters: create num_clusters PostgreSQL database cluster nodes
# -p base_port: specify base port. pgpool port is base_port.
################################################################################
function usage()
{
- echo "usage: $0 [-m r|s|n|l|y|i] [-n num_clusters] [-p base_port] [-pg pg_base_port][--no-stop] [-d] [-s] [-r] [-e] [-t] [-c]";exit 1
+ echo "usage: $0 [-m r|s|n|l|i] [-n num_clusters] [-p base_port] [-pg pg_base_port][--no-stop] [-d] [-s] [-r] [-e] [-t] [-c]";exit 1
}
#-------------------------------------------
s ) MODE="s";;
n ) MODE="n";;
l ) MODE="l";;
- y ) MODE="y";;
i ) MODE="i";;
* ) usage;;
esac
l ) MODENAME="logical replication mode"
CLUSTERING_MODE_STR="logical_replication"
;;
- y ) MODENAME="slony mode"
- CLUSTERING_MODE_STR="slony"
- ;;
i ) MODENAME="snapshot isolation mode"
CLUSTERING_MODE_STR="snapshot_isolation"
;;
add_user $username $pg_hba $PGPORT
- # for logical replication and slony, we need to manually
+ # for logical replication, we need to manually
# add PostgreSQL user to node 1.
- if [ $mode = 'l' -o $mode = 'y' ];then
+ if [ $mode = 'l' ];then
add_user $username $pg_hba "11003"
fi
add_pool_hba $username $pool_hba $PGPOOL_VERSION_DIGIT