<span id="result_box" class="" lang="en"><span class="hps">Thanks</span><span>,</span>Tatsuo,  <span class="hps">I did</span> <span class="hps">like you said and</span> <span class="hps">it works</span><span>.</span> <span class="hps">however,</span> <span class="hps">doing</span> <span class="hps">an insert</span> <span class="hps">from</span> <span class="hps">pgadmin</span><span>,</span> <span class="hps">configured</span> <span class="hps">to point to</span> <span class="hps">my</span> <span class="hps">virtual</span> <span class="hps">ip</span> <span class="hps">and</span> <span class="hps">port 9999</span><span>,</span> <span class="hps">and inserting</span> <span class="hps">it from there</span><span>, again</span> <span class="hps">there are differences</span> <span class="hps">between the</span> <span class="hps">servers,</span> <span class="hps">but</span> <span class="hps">the</span> <span class="hps">insert</span> <span class="hps">from</span> <span class="hps">console</span><span>, no differences</span> <span class="hps">between</span> <span class="hps">timestamp</span> <span class="hps">fields</span> <span class="hps">with</span> <span class="hps">default</span> <span class="hps">now ()</span> <span class="hps">on both</span> <span class="hps">server</span><span>.</span> <span class="hps">the question is</span><span>,</span> <span class="hps">I can not use</span> <span class="hps">pgadmin</span> <span class="hps">to insert or</span> <span class="hps">modify data</span> <span class="hps">to</span> <span class="hps">be</span> <span class="hps">pgPool</span><span class="atn">-</span><span class="">II</span><span class="">?</span><span class="">?</span></span> <span id="result_box" class="" lang="en"><span class=""></span> <span class="hps">that</span> <span class="hps">creating</span> <span class="hps">data</span> <span class="hps">objects and</span> <span class="hps">inclusive</span><span>,</span> <span class="hps">well</span> <span class="hps">since</span> <span class="hps">I</span> <span class="hps">pgadmin</span> <span class="hps">replica</span><span>,</span> <span class="hps">but with</span> <span class="hps">timestamp</span> <span class="hps">fields</span> <span class="hps">default</span> <span class="hps">now ()</span><span>,</span> <span class="hps">there</span> <span class="hps">does not record</span> <span class="hps">the same</span> <span class="hps">milliseconds<br>
<br>Regards<br></span></span><br><div class="gmail_quote">2012/9/13 Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Your CREATE TABLE statement contains error (notice no space between<br>
&quot;name&quot; and &quot;character&quot;). Probably what happend was:<br>
<br>
1) &quot;test&quot; table was not created becuase of error.<br>
<br>
2) subsequent INSERT failed because no such table exists.<br>
<br>
3) in the mean time pgpool checks systems catalog whether test table<br>
   contains any timetamp columns. If the test succeeds, INSERT<br>
   statement which lacks values for timestamp columns are replaced<br>
   with constant time values taken from master node.<br>
<br>
4) unfortunately because &quot;test&quot; table does not exist, the query<br>
   against the system catalog returns no data, so pgpool decides not<br>
   to replace timestamp columuns and this decision is cached.<br>
<br>
5) later on &quot;table&quot; table was created by fixed create table statement.<br>
<br>
6) same INSERT statement executed but because of the cache created at<br>
   #4, timestampe column rewritten did not happen and you see time<br>
   different between those servers.<br>
<br>
Please fix the CREATE statement, retstart pgpool and do the test<br>
again. If you enable log_per_node_statement, you should see time<br>
stampe rewriting effect something like this:<br>
<br>
2012-09-13 23:53:11 LOG:   pid 19571: DB node id: 0 backend pid: 19664 statement: INSERT INTO &quot;test&quot;(&quot;name&quot;, &quot;alta&quot;, &quot;mod&quot;) VALUES (&#39;first test&#39;,&#39;2012-09-13 23:53:11.704591+09&#39;,&#39;2012-09-13 23:53:11.704591+09&#39;)<br>

2012-09-13 23:53:11 LOG:   pid 19571: DB node id: 1 backend pid: 19663 statement: INSERT INTO &quot;test&quot;(&quot;name&quot;, &quot;alta&quot;, &quot;mod&quot;) VALUES (&#39;first test&#39;,&#39;2012-09-13 23:53:11.704591+09&#39;,&#39;2012-09-13 23:53:11.704591+09&#39;)<br>

<div class="HOEnZb"><div class="h5">--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
&gt; thanks for replying,<br>
&gt;<br>
&gt; I have my development database that contains the table test. well, to insert<br>
&gt; records, comparing both tables and I see the difference in milliseconds that<br>
&gt; were generated in each server. I need that times are exact, since we<br>
&gt; have a procurement<br>
&gt; system for auction, which requires the milliseconds, and that can make a<br>
&gt; difference to any bidder wins the bid.<br>
&gt; the truth is that it&#39;s random, I went back to try and generate some logs me<br>
&gt; equal, and others have differences in milliseconds<br>
&gt;<br>
&gt; CREATE TABLE test<br>
&gt; (<br>
&gt;   id bigserial NOT NULL,<br>
&gt;   namecharacter varying(200),<br>
&gt;   alta timestamp without time zone DEFAULT now(),<br>
&gt;   mod timestamp with time zone DEFAULT now()<br>
&gt; )<br>
&gt; WITH (<br>
&gt;   OIDS=FALSE<br>
&gt; );<br>
&gt;<br>
&gt;  insert into test(name) values(&#39;first test&#39;);<br>
&gt;<br>
&gt;<br>
&gt; server 1 : select * from prueba;<br>
&gt;  id |            nombre            |       tiempo        |<br>
&gt; alta            |              mod<br>
&gt; ----+------------------------------+---------------------+----------------------------+-------------------------------<br>
&gt;   1 | diego                        | 2012-09-04 14:23:45 |  2012-09-04<br>
&gt; 14:25:33.040833 |   2012-09-04 14:56:57.631909-04<br>
&gt;   2 | ayala                        | 2012-09-04 14:24:22 |  2012-09-04<br>
&gt; 14:25:33.040833 |   2012-09-04 14:56:57.631909-04<br>
&gt;   3 | pepe                         | 2012-09-04 14:24:28 |  2012-09-04<br>
&gt; 14:25:33.040833 |   2012-09-04 14:56:57.631909-04<br>
&gt;   4 | mujica                       | 2012-09-04 14:24:35 |  2012-09-04<br>
&gt; 14:25:33.040833 |   2012-09-04 14:56:57.631909-04<br>
&gt;   5 | rolo                         | 2012-09-04 14:25:45 |     2012-09-04<br>
&gt; 14:25:45.143966   |    2012-09-04 14:56:57.631909-04<br>
&gt;   6 | chespi                       | 2012-09-04 14:26:00 |   2012-09-04<br>
&gt; 14:25:59.735838 |    2012-09-04 14:56:57.631909-04<br>
&gt;   7 | trifulcio rapado             | 2012-09-04 14:26:26 |  2012-09-04<br>
&gt; 14:26:26.056678 |    2012-09-04 14:56:57.631909-04<br>
&gt;   8 | eraldo                       | 2012-09-04 14:27:45 |     2012-09-04<br>
&gt; 14:27:45.082837 |    2012-09-04 14:56:57.631909-04<br>
&gt;   9 | CORTINAS                     | 2012-09-04 14:53:07 |  2012-09-04<br>
&gt; 14:53:07.086145 |   2012-09-04 14:56:57.631909-04<br>
&gt;  10 | PUERTAS                      | 2012-09-04 14:57:30 |  2012-09-04<br>
&gt; 14:57:30.109121 |   2012-09-04 14:57:30.109121-04<br>
&gt;<br>
&gt;  11 | prueba de desarrollo         | 2012-09-13 09:05:25 |  2012-09-13<br>
&gt; 09:05:25.393988 |   2012-09-13 09:05:25.393988-04<br>
&gt;  12 | segunda prueba de desarrollo | 2012-09-13 09:06:24 |  2012-09-13<br>
&gt; 09:06:24.083936 |   2012-09-13 09:06:24.083936-04<br>
&gt; (12 rows)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; server 2: select * from prueba;<br>
&gt;  id |            nombre            |       tiempo        |<br>
&gt; alta            |              mod<br>
&gt; ----+------------------------------+---------------------+----------------------------+-------------------------------<br>
&gt;   1 | diego                        | 2012-09-04 14:23:45 |   2012-09-04<br>
&gt; 14:25:33.042316 |    2012-09-04 14:56:57.633128-04<br>
&gt;   2 | ayala                        | 2012-09-04 14:24:22 |   2012-09-04<br>
&gt; 14:25:33.042316 |   2012-09-04 14:56:57.633128-04<br>
&gt;   3 | pepe                         | 2012-09-04 14:24:28 |   2012-09-04<br>
&gt; 14:25:33.042316 |   2012-09-04 14:56:57.633128-04<br>
&gt;   4 | mujica                       | 2012-09-04 14:24:35 |   2012-09-04<br>
&gt; 14:25:33.042316 |   2012-09-04 14:56:57.633128-04<br>
&gt;   5 | rolo                         | 2012-09-04 14:25:45 |   2012-09-04<br>
&gt; 14:25:45.144954 |   2012-09-04 14:56:57.633128-04<br>
&gt;   6 | chespi                       | 2012-09-04 14:26:00 |   2012-09-04<br>
&gt; 14:25:59.736717 |   2012-09-04 14:56:57.633128-04<br>
&gt;   7 | trifulcio rapado             | 2012-09-04 14:26:26 |   2012-09-04<br>
&gt; 14:26:26.057284 |   2012-09-04 14:56:57.633128-04<br>
&gt;   8 | eraldo                       | 2012-09-04 14:27:45 |   2012-09-04<br>
&gt; 14:27:45.083635 |    2012-09-04 14:56:57.633128-04<br>
&gt;   9 | CORTINAS                     | 2012-09-04 14:53:07 |   2012-09-04<br>
&gt; 14:53:07.087332 |   2012-09-04 14:56:57.633128-04<br>
&gt;  10 | PUERTAS                      | 2012-09-04 14:57:30 |   2012-09-04<br>
&gt; 14:57:30.110247 |   2012-09-04 14:57:30.110247-04<br>
&gt;<br>
&gt;  11 | prueba de desarrollo         | 2012-09-13 09:05:25 |   2012-09-13<br>
&gt; 09:05:25.393988 |   2012-09-13 09:05:25.393988-04<br>
&gt;  12 | segunda prueba de desarrollo | 2012-09-13 09:06:24 |   2012-09-13<br>
&gt; 09:06:24.083936 |   2012-09-13 09:06:24.083936-04<br>
&gt; (12 rows)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; lazaro therefore seen, the watchdog does almost the same as the hearbeat,<br>
&gt; just as enbebido say already in the nucleus of pgPool-II, also, it proves<br>
&gt;<br>
&gt; thanks for the help<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2012/9/12 Lazáro Rubén García Martínez &lt;<a href="mailto:lgarciam@vnz.uci.cu">lgarciam@vnz.uci.cu</a>&gt;<br>
&gt;<br>
&gt;&gt; The core of pgpool-II 3.2 has a new functionality developed for the high<br>
&gt;&gt; availability of pgpool, it is called watchdog. Maybe you could use it<br>
&gt;&gt; instead of heartbeat. This is not the case of the problem, this is only one<br>
&gt;&gt; recomendation.<br>
&gt;&gt;<br>
&gt;&gt; Regards.<br>
&gt;&gt; ________________________________________<br>
&gt;&gt; From: <a href="mailto:pgpool-general-bounces@pgpool.net">pgpool-general-bounces@pgpool.net</a> [<a href="mailto:pgpool-general-bounces@pgpool.net">pgpool-general-bounces@pgpool.net</a>]<br>
&gt;&gt; On Behalf Of Diego Ayala [<a href="mailto:netdiego81@gmail.com">netdiego81@gmail.com</a>]<br>
&gt;&gt; Sent: Wednesday, September 12, 2012 5:18 PM<br>
&gt;&gt; To: Tatsuo Ishii<br>
&gt;&gt; Cc: <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
&gt;&gt; Subject: [pgpool-general: 989] Re: Fwd: Timestamp and pgpool-II 3.2<br>
&gt;&gt;<br>
&gt;&gt; this is my config file. forget to mention, I&#39;m also using heartbeat, high<br>
&gt;&gt; availability for pgPool-II<br>
&gt;&gt;<br>
&gt;&gt; 2012/9/12 Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&lt;mailto:<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;&gt;<br>
&gt;&gt; &gt; good afternoon, I have a question, if you could get me out of doubt, to<br>
&gt;&gt; have<br>
&gt;&gt; &gt; a timestamp() without time zone NOT NULL DEFAULT now (), to replicate,<br>
&gt;&gt; &gt; there differences<br>
&gt;&gt; &gt; in thousandths between each server. That is a problem or pgPool-II, there<br>
&gt;&gt; &gt; is a solution to not happen? I&#39;m using version 3.2 on pgPool REL6-II and<br>
&gt;&gt; &gt; PostgreSQL 9.1<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; thanks for the help<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; eg<br>
&gt;&gt; &gt; Server 1 =  2012-09-04 14:57:30.109121-04<br>
&gt;&gt; &gt; Server 2 =  2012-09-04 14:57:30.110247-04<br>
&gt;&gt;<br>
&gt;&gt; Please show us pgpool.conf.<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ________________________________<br>
&gt;&gt; Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE<br>
&gt;&gt; ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!<br>
&gt;&gt; <a href="http://www.antiterroristas.cu" target="_blank">http://www.antiterroristas.cu</a><br>
&gt;&gt; <a href="http://justiciaparaloscinco.wordpress.com" target="_blank">http://justiciaparaloscinco.wordpress.com</a><br>
&gt;&gt;<br>
&gt;&gt; Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE<br>
&gt;&gt; ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!<br>
&gt;&gt; <a href="http://www.antiterroristas.cu" target="_blank">http://www.antiterroristas.cu</a><br>
&gt;&gt; <a href="http://justiciaparaloscinco.wordpress.com" target="_blank">http://justiciaparaloscinco.wordpress.com</a><br>
&gt;&gt;<br>
</div></div></blockquote></div><br>