replication from multiple "master" servers to a single read-only slave - Mailing list pgsql-general

From Omar Mehmood
Subject replication from multiple "master" servers to a single read-only slave
Date
Msg-id 878327.9129.qm@web53607.mail.re2.yahoo.com
Whole thread Raw
Responses Re: replication from multiple "master" servers to a single read-only slave  (David Fetter <david@fetter.org>)
Re: replication from multiple "master" servers to a single read-only slave  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
I'm wondering if it's possible to have a setup with multiple "master" servers replicating to a single slave.  I can
guaranteethat each server will generate unique PK values for all tables and all the data is partitioned (logically by
server)across the servers.  I would simply like to have a read-only slave that is a picture of all the servers' data
(relativelyup to date).  The individual "master" servers never need to know about each other's data (i.e. they do not
_need_to "sync" with each other, nor do I want them to be sync'd). 

Would it be possible to use PostgreSQL PITR feature to support this functionality ?  All of the data
created/updated/deletedper server is unique to that server, so replaying the log to the slave should technically be
safeand the replaying logs from multiple servers should be safe as well (as long as the relative order of replay is
preserved). I'm just wondering how to get around the numbering of the log (WAL) files and the slave's tracking of the
logfiles that it has already processed. 

I can certainly write my own application log module that runs on each server, ship over the log to the slave machine
andreplay the logs to the slave (in the meanwhile ensuring that the order of replay is preserved and all that good
stuff),but I'm trying to find a quick(er) solution for the short term. 

Please note that I'd like to avoid using PostgreSQL data partitioning as well as any DB triggers (in case anyone was
goingto go down that path as part of the solution). 

Omar




pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Database size
Next
From: David Fetter
Date:
Subject: Re: replication from multiple "master" servers to a single read-only slave