Re: 9.1 Streaming Replication

Поиск
Список
Период
Сортировка
От Devrim GÜNDÜZ
Тема Re: 9.1 Streaming Replication
Дата
Msg-id 1355376936.2992.20.camel@lenovo01-laptop03.gunduz.org
обсуждение исходный текст
Ответ на 9.1 Streaming Replication  (Tony Nelson <tnelson@starpoint.com>)
Список pgsql-admin
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

Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tony Nelson
Дата:
Сообщение: 9.1 Streaming Replication
Следующее
От: Haifeng Liu
Дата:
Сообщение: Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)