<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"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></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>
"name" and "character"). Probably what happend was:<br>
<br>
1) "test" 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 "test" 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 "table" 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 "test"("name", "alta", "mod") VALUES ('first test','2012-09-13 23:53:11.704591+09','2012-09-13 23:53:11.704591+09')<br>

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