[Pgcluster-general] technical question

Andreas Kostyrka andreas at kostyrka.org
Wed Jan 24 15:14:49 UTC 2007


* a.mitani at sra-europe.com <a.mitani at sra-europe.com> [070124 15:45]:
> Hi,
> 
> I put following query in PGCluster.
> Using table is generated by pgbench.
> 
> At first, insert from "Cluster 1"
> 
> test=# insert into history values (1,2,3,4,'now');
> INSERT 0 1
> test=# select * from history ;
>  tid | bid | aid | delta |           mtime            | filler
> -----+-----+-----+-------+----------------------------+--------
>    1 |   2 |   3 |     4 | 2007-01-24 15:24:52.357065 |
> (1 row)
> 
> test=# insert into history(mtime,tid,bid,aid) values ('now',10,20,(select
> bid from history where tid=10));
> INSERT 0 1
> test=# select * from history ;
>  tid | bid | aid | delta |           mtime            | filler
> -----+-----+-----+-------+----------------------------+--------
>    1 |   2 |   3 |     4 | 2007-01-24 15:24:52.357065 |
>   10 |  20 |     |       | 2007-01-24 15:29:50.926981 |
> (2 rows)
> 
> Then now, in "Cluster 2"
> test=# select * from history ;
>  tid | bid | aid | delta |           mtime            | filler
> -----+-----+-----+-------+----------------------------+--------
>    1 |   2 |   3 |     4 | 2007-01-24 15:24:52.357065 |
>   10 |  20 |     |       | 2007-01-24 15:29:50.926981 |
> (2 rows)
> 
> The data writing query is execute one by one in each Cluster DB.
> And all Cluster DB uses the value sent from replication server as a value
> of now().

Well, how does pgcluster serialize statements? And does it apply
statements done on two connections concurrently?

Andreas


More information about the Pgcluster-general mailing list