Solved

PostgreSQL synchronization (master-slave)

Posted on 2011-09-29
13
1,272 Views
Last Modified: 2012-05-12
Hi,

I have two PostgreSQL server's, one with ubuntu + PostgreSQL 8.3 as a master and the other with CentOS 5 + PostgreSQL 8.4 as a slave.

I want to configrure a one-way synchronization between master and slave.

How can I do this? What is the best program?

Best regards

André Bolinhas
0
Comment
Question by:abolinhas
  • 7
  • 3
  • 2
  • +1
13 Comments
 
LVL 22

Expert Comment

by:earth man2
ID: 36818641
0
 
LVL 9

Author Comment

by:abolinhas
ID: 36818786
How can I upgrade from 8.X to 9.X in ubuntu and centos ?
0
 
LVL 9

Author Comment

by:abolinhas
ID: 36818788
A important question before try upgrade, postgres 9.X support postgis ?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 22

Expert Comment

by:earth man2
ID: 36900554
One way is to use the 9.1 PostgreSQL source and compile and install on your machine.
The commands are basically ./configure and make install
pg_dump can be used to create a database backup.  psql can be used to create the new database.

You'll have to recompile Postgis as well with new PostgreSQL server headers.

Postgis requrements state PostgreSQL 8.3 or higher.
0
 
LVL 9

Author Comment

by:abolinhas
ID: 36909488
My cpanel / whm don't support the postgres 9.X

I already have the 8.3.16 on both sides  (mastes and slave)

To configrure a one-way synchronization between master and slave, the slony-I is the best choise ?
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 36909870
I would highly recommend Slony.  I used it several years ago to keep three machines synchronized and it worked quite well, though the documentation wasn't as clear in some areas as I'd like.  From personal experience, it would be a good idea to have something that specifically monitors Slony, just so you're aware if it gets stuck.
0
 
LVL 9

Author Comment

by:abolinhas
ID: 36909902
I need to install slony on both server or only in master ?
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 36910402
Unless something has changed, it must be installed (and configured) on both.  It has been a few years since I've dealt with it, though.
0
 
LVL 9

Author Comment

by:abolinhas
ID: 36910428
I'm starting read slony documentation but is very very confuse and hard.

Starting i can not install on my server (master), I get this error on make
 
slony1_funcs.c:23:23: error: miscadmin.h: No such file or directory
slony1_funcs.c:24:29: error: nodes/makefuncs.h: No such file or directory
slony1_funcs.c:25:29: error: parser/keywords.h: No such file or directory

Open in new window


You had this kind of problems to ?
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 36911397
Did you compile it from source?  It might be easier (though not necessarily as up-to-date) to install a package, such as using "apt-get install" in Debian/Ubuntu.
0
 
LVL 9

Author Comment

by:abolinhas
ID: 36911411
yes I compile from source.

Ok, I will try apt-get
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 37127310
just an advice on terms - you do not want synchronisation (two events happening at the same moment in time)

You are looking into database replication.

http://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling

Or for Java-only http://c-jdbc.ow2.org/
0
 
LVL 9

Author Closing Comment

by:abolinhas
ID: 37130558
Thank for help to find rubygrep.

Rubygreps works  very well on my postgres and do exactly what I need.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question