pgpool2.git / summary / log / commit / refs

commit    4a1de8fc066d649cb3d7ff54d2c3689e0abae3eb
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Wed Aug 18 00:22:09 2010 +0000

    Add description about load balaning in streaming replication mode to
    English doc.
    Fix Japanese doc in unnecessary restriction regarding load balaning in
    streaming replication mode.


doc/pgpool-en.html | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++- doc/pgpool-ja.html | 3 +- 2 files changed, 89 insertions(+), 3 deletions(-) diff --git a/doc/pgpool-en.html b/doc/pgpool-en.html index 5ae60a16a..b44e705fe 100644 --- a/doc/pgpool-en.html +++ b/doc/pgpool-en.html @@ -7,7 +7,7 @@ </head> <!-- hhmts start --> -Last modified: Tue Aug 17 15:40:48 JST 2010 +Last modified: Wed Aug 18 08:57:54 JST 2010 <!-- hhmts end --> <body bgcolor="#ffffff"> @@ -1411,6 +1411,93 @@ If the primary node goes dhown, standby will automatically start as a normal PostgreSQL and will be ready to accept write queries. </p> +<h4>Streaming Replication$B$G$N%/%(%j?6$jJ,$1(B</h4> +<p> +While using Streaming replication and Hot Standby, it is important to +determine which query is good to be sent to the primary or the standby, +and which one should not be sent to the standby. +pgpool-II's Streaming Replication mode carefully takes care of this. +In this we explain how chapter how pgpool-II accomplishes this. +</p> +<p> +We distinguish which query should be sent to which node by looking +at query. +</p> +<p> +<ul> + <li>Queries should be sent to the primary node only + <ul> + <li>INSERT, UPDATE, DELETE, COPY FROM, TRUNCATE, CREATE, DROP, ALTER, COMMENT + <li>SELECT ... FOR SHARE | UPDATE + <li>SELECT in transaction isolation level SERIALIZABLE + <li>LOCK command more strict than ROW EXCLUSIVE MODE + <li>Some of transaction commands + <ul> + <li>BEGIN READ WRITE, START TRANSACTION READ WRITE + <li>SET TRANSACTION READ WRITE, SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE + <li>SET transaction_read_only = off + </ul> + <li>Two phase commit commands: PREPARE TRANSACTION, COMMIT PREPARED, ROLLBACK PREPARED + <li>LISTEN, UNLISTEN, NOTIFY + <li>VACUUM + <li>Some of sequence functions(nextval and setval) + <li>Creating large objects + </ul> + <li>Queries can be sent to both the primary node or the standby node. +If load balancing is enabled, these type of queries are sent to the +standby node. +However, if delay_threshold is set and replication delay is higher than +its value, they are sent to the primay node. + <ul> + <li>SELECT not listed above + <li>COPY TO + <li>DECLARE, FETCH, CLOSE + <li>SHOW + </ul> + <li>Queries sent to both the primary node and the standby node + <ul> + <li>SET + <li>DISCARD + <li>DEALLOCATE ALL + </ul> +</ul> +</p> + +<p> +In an explicit transaction: +<ul> + <li>Transaction starting commands such as BEGIN are sent to the primary node. + <li>Following SELECT and some other queries that can be sent to both + primary or standby are executed in the transaction or on + the standby node. + <li><p> +Commands which cannot be executed on the standby such as INSERT are sent +to the primary. +After that even SELECTs are sent to the primary node, +This is because the SELECT might want to see the result of INSERT immediately. +These are continuing until the transaction closes or aborts. +</p> +</ul> +</p> + +<p> +In the extended protocol, it is possible to determine if the query can +be sen to standby or not in load balance mode while parsing the query. +The rule is same as non extended protocol. +For example, INSERTs are sent to the primary node. +Following bind, describe and execute are sent to the primary node as well. +</p> + +<p> +[Note: If parse of SELECT is sent to the standby node due to load +balance then DMLs(such as INSERT) are sent to pgpool-II, then the SELECT +must be executed on the primary node. For this we re-parese the SELECT +on the primary node. +<p> +Finally queries pgpool-II's parser finds to be an error are sent to the +primary node. +</p> + <h4>Online recovery with Streaming Replication</h4> <p> In master/slave mode with streaming replication, you can use online recovery. diff --git a/doc/pgpool-ja.html b/doc/pgpool-ja.html index b31bfdf4d..2358b602b 100644 --- a/doc/pgpool-ja.html +++ b/doc/pgpool-ja.html @@ -8,7 +8,7 @@ <body> <!-- hhmts start --> -Last modified: Tue Aug 17 15:34:08 JST 2010 +Last modified: Wed Aug 18 08:43:08 JST 2010 <!-- hhmts end --> <body bgcolor="#ffffff"> @@ -1514,7 +1514,6 @@ pgpool-II$B$N(BStreaming Replication$B%b!<%I$O!"$3$&$7$??6$jJ,$1$r<+F0E*$K9T$ <li>LISTEN, UNLISTEN, NOTIFY <li>VACUUM <li>$B%7!<%1%s%94XO"$N4X?t(B(nextval$B$d(Bsetval$B$J$I(B)$B$N8F$S=P$7!#(B - $B$?$@$7!"%5%V%/%(%j$d4X?t8F$S=P$7$NCf$G$3$l$i$N4X?t$,99$K8F$P$l$F$$$k>l9g$O%A%'%C%/$NBP>]$K$J$j$^$;$s!#(B <li>$B%i!<%8%*%V%8%'%/%H$N@8@.(B </ul> <li>Primary/Standby$B$I$A$i$K$bAw$k$3$H$N$G$-$kLd$$9g$o$;!#(B [parent: d93b35c9b3e9]