Streaming Rep 101 questions

Started by Gauthier, Daveabout 15 years ago4 messagesgeneral
Jump to latest
#1Gauthier, Dave
dave.gauthier@intel.com

Hi:

I'm going to be experimenting with streaming replication using v9.0.1. Here are a few questions I have at the onset...
1) Is it possible to replicate one database out of many that exist in the DB instance? Or do you have to replicate them all?
2) Is replication transaction based? That is to say, does the act of replicating a transaction wait until the commit on the server side?
3) I will be replicating to a DB server 2 timezones away initially, but perhaps from the US-> India at some future point. Is the PG replication solution meant to do something like this (given sufficient bandwidth of course)?
4) The slave DB instance will also be v9.0.1 on linux, but it wil be a virtual machine. Do you see any problem with that?
5) Is there a step-by-step "how to" document for this?

Thanks in Advance !

#2Ray Stell
stellr@cns.vt.edu
In reply to: Gauthier, Dave (#1)
Re: Streaming Rep 101 questions

On Wed, Feb 02, 2011 at 08:52:02AM -0700, Gauthier, Dave wrote:

I'm going to be experimenting with streaming replication using v9.0.1. Here are a few questions I have at the onset...

why not 9.0.2?

5) Is there a step-by-step "how to" document for this?

http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial

#3Magnus Hagander
magnus@hagander.net
In reply to: Gauthier, Dave (#1)
Re: Streaming Rep 101 questions

On Wed, Feb 2, 2011 at 16:52, Gauthier, Dave <dave.gauthier@intel.com> wrote:

Hi:

I'm going to be experimenting with streaming replication using v9.0.1.  Here
are a few questions I have at the onset...

You should use 9.0.3

1) Is it possible to replicate one database out of many that exist in the DB
instance?  Or do you have to replicate them all?

No, you must do all.

2) Is replication transaction based?  That is to say, does the act of
replicating a transaction wait until the commit on the server side?

Yes, it's transaction based, in the sense that it's transactionally
safe. No, you don't have to wait until commit on the slave side (which
I assume you mean). THat's sync rep, which is hopefully going to be an
option in 9.1.

3) I will be replicating to a DB server 2 timezones away initially, but
perhaps from the US-> India at some future point.  Is the PG replication
solution meant to do something like this (given sufficient bandwidth of
course)?

Should work fine. As long as the connection is reasonably reliable
(doesn't go up and down every minute), a bit of latency shouldn't be a
problem.

4) The slave DB instance will also be v9.0.1 on linux, but it wil be a
virtual machine.  Do you see any problem with that?

None other than potential performance issues if it's too slow.

5) Is there a step-by-step "how to" document for this?

http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Gauthier, Dave (#1)
Re: Streaming Rep 101 questions

On 02/02/2011 07:52 AM, Gauthier, Dave wrote:

Hi:

I'm going to be experimenting with streaming replication using v9.0.1.
Here are a few questions I have at the onset...

1) Is it possible to replicate one database out of many that exist in
the DB instance? Or do you have to replicate them all?

It replicates the cluster.

2) Is replication transaction based? That is to say, does the act of
replicating a transaction wait until the commit on the server side?

It is shipping WAL records, so when they are recorded they ship,
assuming streaming replication.

3) I will be replicating to a DB server 2 timezones away initially, but
perhaps from the US-> India at some future point. Is the PG replication
solution meant to do something like this (given sufficient bandwidth of
course)?

Not sure.

4) The slave DB instance will also be v9.0.1 on linux, but it wil be a
virtual machine. Do you see any problem with that?

FYI 9.0.3 was just released. I have tried it on an EC2 instance as a
test and did not see any problems.

5) Is there a step-by-step "how to" document for this?

http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial

Thanks in Advance !

--
Adrian Klaver
adrian.klaver@gmail.com