Re: [HACKERS] Postgres-R

2008-08-18 Thread leiyonghua

[EMAIL PROTECTED] 写道:

I wish to set up the Postgres-R environment, could you please let me know the 
steps for setting it up.
Thanks.


  
yeah, actually, i have not been successful to set up this, but let me 
give some information for you.

1. download the postgresql snapshot source code from here:
http://www.postgresql.org/ftp/snapshot/dev/
(this is a daily tarball)

2. Get the corresponding patch for postgres-r from:
http://www.postgres-r.org/downloads/

3. apply the patch for snapshot source, and configure like this:

./configure --enable-replication
make  make install

4. install the GCS ensemble, according the document : 
http://www.cs.technion.ac.il/dsl/projects/Ensemble/doc.html


5. start ensemble daemon and gossip if neccessary ( yes, make sure the 
two nodes can 'GCS' each other)


3. Assume that you have two nodes, start up postgresql and create a 
database 'db', and create a table 'tb' for testing which should be have 
a primary key for all nodes.


4. At the origin node, execute the command at psql console:
alter database db start replication in group gcs;
(which means the database 'db' is the origin and the group 'gcs' is the 
GCS group name)


5. At the subscriber node, execute the command:
alter database db accept replication from group gcs;


Hope information above would be helpful, and keep in touch.

leiyonghua

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Postgres-R

2008-08-18 Thread leiyonghua
hi,
Assume that we have two node
node 0 , 192.168.0.2
node 1 , 192.168.0.3
1. add a host entry in /etc/hosts for hostname resolving.
2. add the host list in configuration 'ensemble.conf' for gossip service:
ENS_GOSSIP_HOSTS=node0:node1
3. set the envrionment variable ENS_CONFIG_FILE
export ENS_CONFIG_FILE=/xxx/xxx/ensemble.conf
4. start ensemble  gossip
5. try 'c_mtalk' and happy.

this is a simplest case for me, hehe!

leiyonghua



K, Niranjan (NSN - IN/Bangalore) 写道:
 Thanks for the information.
 For Step5 (starting ensemble daemon).- 
 I set the multicast address to both nodes (Node 1 Node 2 eth0: 224.0.0.9/4)  
 before starting the ensemble. And started the server application mtalk in 
 node 1  node 2 and then client application in node 1  node 2. But the count 
 of members ('nmembers') show as 1. This is the output of the client program 
 'c_mtalk'. Seeing this, I'am assuming that the applications are not merged.
 Could you please let me know how did you proceed with the setup of ensemble?

 regards,
 Niranjan

 -Original Message-
 From: ext leiyonghua [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 18, 2008 2:58 PM
 To: K, Niranjan (NSN - IN/Bangalore); Markus Wanner; 
 pgsql-hackers@postgresql.org
 Subject: Re: Postgres-R

 [EMAIL PROTECTED] 写道:
   
 I wish to set up the Postgres-R environment, could you please let me know 
 the steps for setting it up.
 Thanks.


   
 
 yeah, actually, i have not been successful to set up this, but let me give 
 some information for you.
 1. download the postgresql snapshot source code from here:
 http://www.postgresql.org/ftp/snapshot/dev/
 (this is a daily tarball)

 2. Get the corresponding patch for postgres-r from:
 http://www.postgres-r.org/downloads/

 3. apply the patch for snapshot source, and configure like this:

 ./configure --enable-replication
 make  make install

 4. install the GCS ensemble, according the document : 
 http://www.cs.technion.ac.il/dsl/projects/Ensemble/doc.html

 5. start ensemble daemon and gossip if neccessary ( yes, make sure the two 
 nodes can 'GCS' each other)

 3. Assume that you have two nodes, start up postgresql and create a database 
 'db', and create a table 'tb' for testing which should be have a primary key 
 for all nodes.

 4. At the origin node, execute the command at psql console:
 alter database db start replication in group gcs; (which means the database 
 'db' is the origin and the group 'gcs' is the GCS group name)

 5. At the subscriber node, execute the command:
 alter database db accept replication from group gcs;


 Hope information above would be helpful, and keep in touch.

 leiyonghua


   


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] about postgres-r setup.

2008-08-17 Thread leiyonghua

leiyonghua 写道:

Markus Wanner 写道:

Hello Leiyonghua,

leiyonghua wrote:

at node2, and the psql command is hung up,

NOTICE: Applying for membership in the communication group...
NOTICE: Successfully joined the replication group. Now recovering 
schema...


I've just tested the very same here with ensemble, and could 
reproduce the situation. It had to do with the ensemble receive 
buffer being too small to hold the recovery data. That's fixed in 
today's snapshot. With that I've been able to replicate simple tuples 
again.



that's cool !  i will try later.

Regards

Markus Wanner




leiyonghua


today, i try the snap-shot

postgres-r-20080813.diff

and still same status. 


leiyonghua

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] about postgres-r setup.

2008-07-30 Thread leiyonghua

Markus Wanner 写道:

Hello Leiyonghua,

leiyonghua wrote:

at node2, and the psql command is hung up,

NOTICE: Applying for membership in the communication group...
NOTICE: Successfully joined the replication group. Now recovering 
schema...


I've just tested the very same here with ensemble, and could reproduce 
the situation. It had to do with the ensemble receive buffer being too 
small to hold the recovery data. That's fixed in today's snapshot. 
With that I've been able to replicate simple tuples again.


that's cool !  i will try later. 

Regards

Markus Wanner




leiyonghua

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] about postgres-r setup.

2008-07-28 Thread leiyonghua
hi,
i have setup a postgres-r environment, including two nodes, and
1) the Ensemble daemon run with default configure (means no command options)
2) set the internal variable
repl_default_gcs = 'ensemble'
at postgresql.conf
3) all initial sql script initialized at node1 and node2 as follows:
create database data;
\c data;
create table foo (id serial primary key, n text);
4) execute sql:
alter database data start replication in group tst;

at node1, and seems everything is ok:

NOTICE: Applying for membership in the communication group...
NOTICE: Successfully started replication.
ALTER DATABASE

5)execute sql:
alter database data accept replication from group tst;

at node2, and the psql command is hung up,

NOTICE: Applying for membership in the communication group...
NOTICE: Successfully joined the replication group. Now recovering schema...

so, i dont know what happened, pls give me some advice.

thanks.

best,
leiyonghua

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers