Solved

PostgreSQL synchronization (master-slave)

Posted on 2011-09-29
13
1,261 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
 
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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 61

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Syntax of Postgresql 10 332
Don't see the folder 24 295
DataBase Software 5 114
How can I integrate PostgreSQL database in google docs spreadsheet? 1 206
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now