pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kerem Can Karakaş <blokdiyagram@gmail.com>
To: abraao895 <abraao895@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problem with Streaming Replication
Date: Thu, 30 Jun 2011 15:50:03 +0300
Message-ID: <1309438203.2138.24.camel@kerem-ThinkPad> (raw)
In-Reply-To: <1309436503938-4538638.post@n5.nabble.com>
References: <1309436503938-4538638.post@n5.nabble.com>

On Thu, 2011-06-30 at 05:21 -0700, abraao895 wrote:
> Hi,
> 
> I have a doubt about the WAL-based replication. Suppose this situation:
> 
> - The PC1(master) write the WAL file in the shared folder in her HD.
> 
> - The HD of the PC1(master) dead. The WAL file don't have replicated because
> it is a asynchronous proccess and suppose that this already didn't have
> happened.
This is unlikely to happen when you share the folder of the slave server
to the master as the WAL backup folder.
> 
> - The PC2(slave) doesn't have the last record.
Streaming replication occurs on transaction basis. As taken form the
documentation on 
http://www.postgresql.org/docs/9.0/static/warm-standby.html

"Streaming replication allows a standby server to stay more up-to-date
than is possible with file-based log shipping. The standby connects to
the primary, which streams WAL records to the standby as they're
generated, without waiting for the WAL file to be filled. "

So as soon as it is written on WAL on the master server it is written
also on the slave node. The shared WAL folder is there in case the slave
cannot keep up with the master server. Usually on such a situation it
should not use immediately the WAL logs to keep up. If it happens to use
wal at a particular time, it is on the disk of the slave server anyway.





view thread (4+ messages)  latest in thread

Message-ID: <1309438203.2138.24.camel@kerem-ThinkPad>
Permalink:  ../1309438203.2138.24.camel@kerem-ThinkPad/
Also on:    postgresql.org/message-id/1309438203.2138.24.camel@kerem-ThinkPad

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: blokdiyagram@gmail.com, abraao895@hotmail.com
  Subject: Re: Problem with Streaming Replication
  In-Reply-To: <1309438203.2138.24.camel@kerem-ThinkPad>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox