<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=RO link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>Hello everybody,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'> For the problem described in previous
emails, I found a temporary solution, as a small change in “cluster_table.c”
file.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>ClusterTbl
*<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>PGRset_status_on_cluster_tbl
(int status, ClusterTbl * ptr)<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>{<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>…………………………………………………<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> if
(status == TBL_INIT)<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> {<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> if
(ClusterNum < Max_DB_Server)<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> ClusterNum
++ ;<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> }<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> <b><span
style='font-weight:bold'>else if (status == TBL_STOP</span></b>)<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> {<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> if
(ClusterNum > 0)<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'> ClusterNum
-- ;<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>…………………………………………………………………………
<o:p></o:p></span></font></i></p>
<p class=MsoNormal style='margin-left:70.8pt'><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>}<o:p></o:p></span></font></i></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'> In the 1.7.0rc7 code, it was <b><i><span
style='font-weight:bold;font-style:italic'>status!=TBL_STOP</span></i></b>, as
the condition for decreasing the <b><i><span style='font-weight:bold;
font-style:italic'>ClusterNum</span></i></b>’s value.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'> The previous <b><i><span
style='font-weight:bold;font-style:italic'>status!=TBL_STOP </span></i></b>condition,
determined the number of ClusterDB available to always decrease, when one DB
was in use, or accepting connections, and no decrease operation was done when
the DB node was actually stopped. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'> Am I right when making this change? Or
there are some other logic elements that I cannot see, as I don’t really know
the rest of the code.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'> <o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><b><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-weight:bold'>One more
issue</span></font></b><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>: <i><span style='font-style:italic'>Even</span></i>
having this change done, when a load balancer is <i><span style='font-style:
italic'>restarted</span></i>, it supposes that all Db nodes are up and running.
<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>Let’s say LB1 knows (from
his configuration file) PG1 and PG2 as DB nodes, but PG1 is stopped and PG2 is
running. <o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>LB1 has just been
restarted, then in his <i><span style='font-style:italic'>ClusterTbl * ptr</span></i>
vector, it will consider both (PG1 and PG2) as available nodes. <o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>When a first call through
LB1 is done, it will try PG1 and return failure. PG1 state in LB1’s memory will
be updated at ERROR_NOTICE(98). <o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>The second call through
LB1 will be now, correctly directed towards PG2 (the running DB node).<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>Having that first error
message returned, it may be annoying, as there is an available node in cluster
(PG2). That problem does not appear if LB1 was running when a replicate node
scans for PG1 service.<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>Is anything that can be
done to avoid such problem?<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><b><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-weight:bold'>Another issue:
</span></font></b><font size=2 face=Tahoma><span lang=EN-US style='font-size:
10.0pt;font-family:Tahoma'>Thanks Alessandro for your previous email. It
suggested me to search in PGCLUSTER’s source code. <o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:35.4pt'><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>As you are saying that
calling:<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:70.8pt;text-indent:35.4pt'><font size=2
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'> </span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>PGRset_status_on_cluster_tbl(TBL_STOP....)
determines the number of nodes in cluster to decrease, I suppose that cybercluster
has already the above mentioned change included. (As with previous code: <i><span
style='font-style:italic'>if(status!=TBL_STOP) ClusterNum--,</span></i> the
cluster number does not decrease whe STOP status...).</span></font><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'> Have
a nice day,<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>
Lia Domide.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
pgcluster-general-bounces@pgfoundry.org
[mailto:pgcluster-general-bounces@pgfoundry.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>alessandro oggianu<br>
<b><span style='font-weight:bold'>Sent:</span></b> 16 ianuarie 2008 17:32<br>
<b><span style='font-weight:bold'>To:</span></b>
pgcluster-general@pgfoundry.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Pgcluster-general]
PGcluster, load balancer problem</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hi Lia<br>
<br>
I found a similar issue testing a 2-node configuration with LB and replicator.<br>
I was using cybercluster, but it does't change anything with respect to
pgcluster.<br>
<br>
When I started the crashed node with -R (hot-recovery mode), no connection was
allowed through the LB <br>
even if the surviving node was (obviously) up and running.<br>
Moreover, local connections to that database were allowed, and every DML got
replicated on the second node at the end of the recovery.<br>
<br>
So, looking at source code, I found that in case of recovery, LB's
set_recovery() function calls PGRset_status_on_cluster_tbl passing TBL_STOP
flag as the first argument. In this case, PGRset_status_on_cluster_tbl
decrements the number of cluster members. <br>
<br>
This lead the LB to assume that no cluster members are available at all, even
if one is acting as master in the pg_dump-based recovery and it is definitely
available for any kind of operation.<br>
<br>
I resolved this commenting out the call to
PGRset_status_on_cluster_tbl(TBL_STOP,ptr); within the following block (file
src/cybercluster/pglb/recovery.c) <br>
<br>
<br>
201 case
RECOVERY_PGDATA_ANS:<br>
202
/***********************************************************************<br>
203 * aoggianu 20080104<br>
204 *<br>
205 * Modified this case in order to allow connections
<br>
206 * through the lb even if we are in a 2-node
configuration.<br>
207 * Actual change DO NOT stop_db (as the originale
cybercluster did)<br>
208 * BUT will set the status of the cluster to
TBL_INIT.<br>
209 * This really allow clients to connect to the
already opened db <br>
210 * (which is acting as MASTER) and continue to
work.<br>
211 * This should not have any side effect, as access
to the surviving node<br>
212 * is allowed (bypassing lb) during recovery phase.<br>
213 * <br>
214
************************************************************************/<br>
215
/* DO NOT REALLY stop cluster db */<br>
216
ptr = PGRsearch_cluster_tbl(&key);<br>
217
if (ptr != NULL) <br>
218
{<br>
219 #ifdef PRINT_DEBUG<br>
220
show_debug("%s:DO_NOT_stop_db_aoggianu host:%s port:%d max:%d",<br>
221
func,
packet->hostName,ntohs(packet->port),ntohs(packet->max_connect)); <br>
222 #endif<br>
223<br>
224
/********************************************************<br>
225 *<br>
226 * aoggianu 20080103<br>
227 * Modified the following set_status<br>
228 * in order to allow connections to cluster <br>
229 * even in a 2-node conf<br>
230 * Now passing TBL_INIT instead of TBL_STOP<br>
231 *<br>
232
********************************************************/<br>
233 /********************************************************
<br>
234 *<br>
235 * aoggianu 20080104<br>
236 * Commenting at all the following call to
PGRset_status_on_cluster_tbl.<br>
237 * This way, lb should see just ONE active member,
which is<br>
238 * really what happens during -U recovery <br>
239 *<br>
240 *
PGRset_status_on_cluster_tbl(TBL_STOP,ptr);<br>
241
********************************************************/<br>
242<br>
243
}<br>
<br>
<br>
Hope this helps<br>
<br>
Regards<br>
--alessandro<br>
<br>
<br>
<br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Jan 16, 2008 3:43 PM, Lia Domide <<a
href="mailto:lia.domide@codemart.ro">lia.domide@codemart.ro</a>> wrote:<o:p></o:p></span></font></p>
<div link=blue vlink=purple>
<div>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Hi everybody,</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>I am trying to organize a highly available DB solution using
Postgresql(8.2.5) and pgCluster(1.7.7rc7).</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>I use 2 Ubuntu 7.04 (x32)machines, currently in virtual machines.</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Pg1 (<a href="http://192.168.123.31" target="_blank">192.168.123.31</a>)
</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Rep1</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Lb1</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Pg2(<a href="http://193.168.123.29" target="_blank">193.168.123.29</a>)</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Rep2</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Lb2</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>- I managed to make the replication working;</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>- I checked the etc/hosts file;</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>- When one node is recovering from failure (-R) any operations
executed on the other node is correctly replicated;</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>But the load balancers seem to work in a wrong way (at least not the way
I am expecting them to work).</span></font><o:p></o:p></p>
<p style='margin-left:36.0pt;text-indent:-18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>-</span></font><font
size=1><span lang=EN-US style='font-size:7.5pt'>
</span></font><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial'>first all DB nodes are initialized, as the <i><span
style='font-style:italic'>pglb.sts</span></i> file shows</span></font><o:p></o:p></p>
<p style='margin-left:36.0pt;text-indent:-18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>-</span></font><font
size=1><span lang=EN-US style='font-size:7.5pt'>
</span></font><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial'>immediately after:" PGRscan_cluster:X ClusterDB can be
used" decreases with one (X -1)</span></font><o:p></o:p></p>
<p style='margin-left:36.0pt;text-indent:-18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>-</span></font><font
size=1><span lang=EN-US style='font-size:7.5pt'>
</span></font><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial'>I tried to add 3 DB nodes in cluster, and I have the same
problem: at the beginning "3 ClusterDB nodes can be used" and
immediately after that "2 ClusterDB..", even if all three DB nodes
are running.</span></font><o:p></o:p></p>
<p style='margin-left:36.0pt;text-indent:-18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>-</span></font><font
size=1><span lang=EN-US style='font-size:7.5pt'>
</span></font><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial'>In the 3 nodes scenario, when only the last DB node is up,
the cluster is unreachable, but with any of the first two DB nodes is alive,
the cluster is running.</span></font><o:p></o:p></p>
<p style='margin-left:36.0pt;text-indent:-18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>-</span></font><font
size=1><span lang=EN-US style='font-size:7.5pt'>
</span></font><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;
font-family:Arial'>In the 2 nodes scenario, when the first DB node is down the
cluster is unreachable, even if the second DB node is alive.</span></font><o:p></o:p></p>
<p style='margin-left:18.0pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Does anyone knows why "PGRscan_cluster:X ClusterDB can be
used" decreases, and when the X number is updated?</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>A supplementary node must be always kept for safety reasons? (E.g. from
a 3 nodes cluster only 2 may be used)?</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>Below, some logs from load balancers, in the 2 nodes scenario:</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>On PG2, LB2 log: (PG1 DB node stopped):</span></font><o:p></o:p></p>
<p style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:12.0pt;
margin-left:35.4pt'><i><font size=2 face="Times New Roman"><span lang=EN-GB
style='font-size:10.0pt;font-style:italic'>2008-01-16 15:30:30 [13087]
DEBUG:PGRset_status_on_cluster_tbl():host:pg1 port:5432 max:32 use:0 status1<br>
2008-01-16 15:30:30 [13087] DEBUG:PGRset_status_on_cluster_tbl():host:pg2
port:5432 max:32 use:0 status1<br>
2008-01-16 15:30:30 [13087] DEBUG:init_pglb():Child_Tbl size is[49536]<br>
2008-01-16 15:31:07 [13087] <b><span style='font-weight:bold'>DEBUG:PGRscan_cluster:2
ClusterDB can be used</span></b><br>
2008-01-16 15:31:07 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->1
max->32 use_num->0<br>
<br>
2008-01-16 15:31:07 [13087] DEBUG:PGRset_status_on_cluster_tbl():host:pg1
port:5432 max:32 use:1 status2<br>
2008-01-16 15:31:07 [13116] DEBUG:PGRdo_child():I am 13116<br>
2008-01-16 15:31:07 [13116] DEBUG:do_accept():I am 13116 accept fd 6<br>
2008-01-16 15:31:07 [13116] DEBUG:read_startup_packet():Protocol Major: 3
Minor: 0 database: TEST user: postgres<br>
2008-01-16 15:31:07 [13116] ERROR:connect_inet_domain_socket(): connect()
failed: Connection refused<br>
2008-01-16 15:31:07 [13116] DEBUG:PGRset_status_on_cluster_tbl():host:pg1
port:5432 max:32 use:2 status98<br>
2008-01-16 15:31:09 [13087] <b><span style='font-weight:bold'>DEBUG:PGRscan_cluster:1
ClusterDB can be used</span></b><br>
2008-01-16 15:31:09 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->98
max->32 use_num->1<br>
<br>
2008-01-16 15:31:09 [13087] DEBUG:PGRscan_cluster:pg2 [5432],useFlag->1
max->32 use_num->0<br>
<br>
2008-01-16 15:31:09 [13087] DEBUG:PGRset_status_on_cluster_tbl():host:pg2
port:5432 max:32 use:1 status2<br>
2008-01-16 15:31:09 [13117] DEBUG:PGRdo_child():I am 13117<br>
2008-01-16 15:31:09 [13117] DEBUG:do_accept():I am 13117 accept fd 6<br>
2008-01-16 15:31:09 [13117] DEBUG:read_startup_packet():Protocol Major: 3
Minor: 0 database: TEST user: postgres<br>
2008-01-16 15:31:09 [13117] DEBUG:create_cp():[pg2] [pg2] is same<br>
2008-01-16 15:31:09 [13117] DEBUG:connect_unix_domain_socket():postmaster Unix
domain socket: /tmp/.s.PGSQL.5432<br>
2008-01-16 15:31:09 [13117] DEBUG:connect_unix_domain_socket():connected to
postmaster Unix domain socket: /tmp/.s.PGSQL.5432 fd: 7<br>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ### HERE I created a JDBC
connection from another host…………………………………<br>
2008-01-16 15:31:09 [13117] DEBUG:ReadyForQuery(): message length: 5<br>
2008-01-16 15:31:09 [13117] DEBUG:ReadyForQuery(): transaction state: I<br>
2008-01-16 15:31:09 [13117] DEBUG:ProcessFrontendResponse():read kind from
frontend X(58)<br>
2008-01-16 15:33:32 [13087] <b><span style='font-weight:bold'>DEBUG:PGRscan_cluster:0
ClusterDB can be used</span></b><br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] <b><span style='font-weight:bold'>ERROR:PGRload_balance():no
cluster available</span></b><br>
2008-01-16 15:33:32 [13087] ERROR:load_balance_main():load balance process
failed<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] ERROR:PGRload_balance():no cluster available<br>
2008-01-16 15:33:32 [13087] ERROR:load_balance_main():load balance process
failed<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1<br>
……………………………………………….<br>
2008-01-16 15:33:32 [13087] ERROR:PGRload_balance():no cluster available<br>
2008-01-16 15:33:32 [13087] ERROR:load_balance_main():load balance process
failed<br>
2008-01-16 15:33:32 [13087] ERROR:load_balance_main():no cluster available<br>
2008-01-16 15:33:32 [13087] DEBUG:do_accept():I am 13087 accept fd 6<br>
2008-01-16 15:33:32 [13087] DEBUG:read_startup_packet():Protocol Major: 3
Minor: 0 database: TEST user: postgres<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:0 ClusterDB can be used<br>
2008-01-16 15:33:32 [13087] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->99
max->32 use_num->1</span></font></i><o:p></o:p></p>
<p><i><font size=2 face="Times New Roman"><span lang=EN-GB style='font-size:
10.0pt;font-style:italic'> </span></font></i><o:p></o:p></p>
<p><font size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:
Arial'>On PG1, LB1 log (both PG1 and PG2 DB services were previously started on
5432 port, with postgres user):</span></font><o:p></o:p></p>
<p style='margin-left:35.4pt'><i><font size=2 face="Times New Roman"><span
lang=EN-GB style='font-size:10.0pt;font-style:italic'>2008-01-16 16:13:27 [29688]
DEBUG:PGRset_status_on_cluster_tbl():host:pg1 port:5432 max:42 use:0 status1<br>
2008-01-16 16:13:27 [29688] DEBUG:PGRset_status_on_cluster_tbl():host:pg2
port:5432 max:42 use:0 status1<br>
2008-01-16 16:13:27 [29688] DEBUG:init_pglb():Child_Tbl size is[65016]<br>
2008-01-16 16:13:28 [29688] <b><span style='font-weight:bold'>DEBUG:PGRscan_cluster:2
ClusterDB can be used</span></b><br>
2008-01-16 16:13:28 [29688] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->1
max->42 use_num->0<br>
<br>
2008-01-16 16:13:28 [29688] DEBUG:PGRset_status_on_cluster_tbl():host:pg1
port:5432 max:42 use:1 status2<br>
2008-01-16 16:13:28 [29695] DEBUG:PGRdo_child():I am 29695<br>
2008-01-16 16:13:28 [29695] DEBUG:do_accept():I am 29695 accept fd 6<br>
2008-01-16 16:13:28 [29695] ERROR:pool_read: read failed (Connection reset by
peer)<br>
2008-01-16 16:13:30 [29688] <b><span style='font-weight:bold'>DEBUG:PGRscan_cluster:1
ClusterDB can be used</span></b><br>
2008-01-16 16:13:30 [29688] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->2
max->42 use_num->0</span></font></i><o:p></o:p></p>
<p style='margin-left:35.4pt'><font size=2 face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial'>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span></font><o:p></o:p></p>
<p style='margin-left:35.4pt'><i><font size=2 face="Times New Roman"><span
lang=EN-GB style='font-size:10.0pt;font-style:italic'>2008-01-16 16:24:58
[31526] DEBUG:PGRdo_child():I am 31526<br>
2008-01-16 16:24:58 [31526] DEBUG:do_accept():I am 31526 accept fd 6<br>
2008-01-16 16:24:58 [31526] ERROR:pool_read: read failed (Connection reset by
peer)<br>
2008-01-16 16:25:00 [29688] DEBUG:PGRscan_cluster:1 ClusterDB can be used<br>
2008-01-16 16:25:00 [29688] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->2
max->42 use_num->0<br>
<br>
2008-01-16 16:25:00 [31531] DEBUG:PGRdo_child():I am 31531<br>
2008-01-16 16:25:00 [31531] DEBUG:do_accept():I am 31531 accept fd 6<br>
2008-01-16 16:25:00 [31531] ERROR:pool_read: read failed (Connection reset by
peer)<br>
2008-01-16 16:25:02 [29688] DEBUG:PGRscan_cluster:1 ClusterDB can be used<br>
2008-01-16 16:25:02 [29688] DEBUG:PGRscan_cluster:pg1 [5432],useFlag->2
max->42 use_num->0</span></font></i><o:p></o:p></p>
<p style='margin-left:35.4pt'><i><font size=2 face="Times New Roman"><span
lang=EN-GB style='font-size:10.0pt;font-style:italic'> </span></font></i><o:p></o:p></p>
<p style='margin-left:35.4pt'><i><font size=2 face="Times New Roman"><span
lang=EN-GB style='font-size:10.0pt;font-style:italic'> </span></font></i><o:p></o:p></p>
<p style='margin-left:35.4pt'><font size=2 face="Times New Roman"><span
lang=EN-GB style='font-size:10.0pt'>
Thanks in advance,</span></font><o:p></o:p></p>
<p style='margin-left:35.4pt'><font size=2 face="Times New Roman"><span
lang=EN-GB style='font-size:10.0pt'>
Lia Domide.</span></font><o:p></o:p></p>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
Pgcluster-general mailing list<br>
<a href="mailto:Pgcluster-general@pgfoundry.org">Pgcluster-general@pgfoundry.org</a><br>
<a href="http://pgfoundry.org/mailman/listinfo/pgcluster-general"
target="_blank">http://pgfoundry.org/mailman/listinfo/pgcluster-general</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>