Re: 9.1 Streaming Replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 2012-12-13 at 00:21 -0500, Tony Nelson wrote:

> I distribute wal segments to the targets using rsync.  One target is
> in the same rack as the primary, the other is a couple of states
> aways.  That seems to be working just fine.  What I can't seem to
> figure out is what they are used for?  The target servers seem to
> connect to the primary and sync from that, not from the wal logs.  Are
> they there in case of an extended disconnect?

When standby goes offline for a while (like you restart it), SR slave
tries to catch master first by replaying xlogs that have been
transferred to it, and then connects to walsender to get the new data.
That's why you need to transfer WAL segments.

> Also, when my target server comes up it always seems to complain that
> it can't find a wal archive.  It's always the one that is currently be
> written on the primary, that hasn't been archived yet.  Is that
> normal?

When standby comes up, it tries to read every not-applied WAL archive
first (as I wrote above), while looking for the next one to apply. If
next one is not available, then it tries to connect to walsender on
master node, and hopefully comes in sync with master. 

That said, you may want to take a look at wal_keep_segments parameter,
if you haven't done already:

http://www.postgresql.org/docs/devel/static/runtime-config-replication.html

Regards,

<snip>

> Has anyone implemented a nagios monitor for these processes?

IIRC check_postgres (http://bucardo.org/wiki/Check_postgres) has a
monitoring stuff for this.

-HTH.

Regards,
-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux