Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1306
  • Last Modified:

PostgreSQL synchronization (master-slave)

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
abolinhas
Asked:
abolinhas
  • 7
  • 3
  • 2
  • +1
1 Solution
 
earth man2Commented:
0
 
abolinhasAuthor Commented:
How can I upgrade from 8.X to 9.X in ubuntu and centos ?
0
 
abolinhasAuthor Commented:
A important question before try upgrade, postgres 9.X support postgis ?
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
earth man2Commented:
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
 
abolinhasAuthor Commented:
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
 
crazedsanityCommented:
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
 
abolinhasAuthor Commented:
I need to install slony on both server or only in master ?
0
 
crazedsanityCommented:
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
 
abolinhasAuthor Commented:
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
 
crazedsanityCommented:
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
 
abolinhasAuthor Commented:
yes I compile from source.

Ok, I will try apt-get
0
 
gheistCommented:
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
 
abolinhasAuthor Commented:
Thank for help to find rubygrep.

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 7
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now