<div>Thank you Steve,</div>
<div> </div>
<div>Let me work and get back with the result.</div>
<div> </div>
<div>Regards</div>
<div>Raghav<br><br></div>
<div class="gmail_quote">On Sun, Oct 10, 2010 at 3:19 AM, Steve Singer <span dir="ltr">&lt;<a href="mailto:ssinger_pg@sympatico.ca">ssinger_pg@sympatico.ca</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">raghavendra t wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi All,<br><br>I am using slony with perltools.<br><br>I have taken the sample file from the &quot;/usr/local/src/slony1-2.0.4/tools/altperl/slon_tools.conf-sample&quot; and modified as per my requirement.<br>
<br>_Question_<br><br>In the place of Tables list/Sequenst list. Can I use any text file which contain all the tables information. If yes, how could I pass the test file to the &quot;slon_tools.conf-sample&quot;.<br></blockquote>
<br></div>Yes, slon_tools.conf is a perl script, the slon_tools run the .conf file as a perl script and execute the code in it.<br><br>So you can just write perl code inside of the conf file to open up your file and read it into a variable.<br>
<br>I have not tested/tried to run the below code so there might be a syntax error or other problems but it should give you the general idea. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>My Testing<br>========<br>1. Created a tables file &quot;tab.txt&quot; with set of replicating primary key tables.<br>
<br>2. Edited the &quot;slon_tools.conf-sample&quot; and trying to send the &quot;tab.txt&quot; file. Below is the &quot;slon_tools.conf-sample&quot; file I am trying to use<br><br>$CLUSTER_NAME = &#39;firstreplic&#39;;<br>
$LOGDIR = &#39;/var/log/slony&#39;;<br>$MASTERNODE = 1;<br>$DEBUGLEVEL = 2;<br>*$TABLEFILE = &#39;/usr/local/pgsql/bin/tab.txt&#39;;*<br><br>&amp;add_node(node =&gt; 1,host =&gt; &#39;localhost&#39;,dbname =&gt; &#39;master&#39;,port =&gt; 5455,user =&gt; &#39;postgres&#39;,password =&gt; &#39;&#39;);<br>
&amp;add_node(node =&gt; 2,host =&gt; &#39;localhost&#39;,dbname =&gt; &#39;slave&#39;,port =&gt; 5456,user =&gt; &#39;postgres&#39;,password =&gt; &#39;&#39;);<br></blockquote><br></div>open(INFILE,&quot;&lt;$TABLEFILE&quot;);<br>
my $tables=&#39;&#39;;<br>while(&lt;INFILE&gt;) {<br><br>{<br>  $line = chomp $_;<br>  $tables+=$line;<br>}<br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im"><br>$SLONY_SETS =<br>{<br>   &quot;set1&quot; =&gt;<br>   {<br>       &quot;set_id&quot; =&gt; 1,<br>       &quot;table_id&quot; =&gt; 1,<br>       &quot;pkeyedtables&quot; =&gt;<br></div>                      * [$TABLEFILE,],*<br>
</blockquote>pkeytables=&gt;$tables  #(replace the above line with this one)<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">   }<br>};<br><br>Kindly assist me, how to achieve this task.<br><br>Best Regards<br><br>Raghav<br><br><br><br></div>------------------------------------------------------------------------<br><br>_______________________________________________<br>
Slony1-general mailing list<br><a href="mailto:Slony1-general@lists.slony.info" target="_blank">Slony1-general@lists.slony.info</a><br><a href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
</blockquote><br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards 
<div><br></div>
<div>Raghav</div>
<div><br></div><br>