Re: Hot-Standby resync problem after connection loss

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Stefan Kohlhauser <stefan(dot)kohlhauser(at)gmx(dot)net>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Hot-Standby resync problem after connection loss
Date: 2014-01-11 08:26:12
Message-ID: CA+U5nMKkqzqWoNNKECRkWF_BZ2R2daz8za_dWDAnW1_pcG12FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 9 January 2014 10:00, Stefan Kohlhauser <stefan(dot)kohlhauser(at)gmx(dot)net> wrote:

> However, the new insert is not shown on node 1 when i query the DB with
> psql, on node 2 it is shown.
>
> recovery.conf:
> standby_mode = 'on'
> primary_conninfo = 'host=pgreplicationha port=5432 user=replicate
> application_name=kamailionode2 '
> restore_command = 'scp -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null
> -o StrictHostkeyChecking=no pgreplicationha:/var/lib/kamailiodb1/archive/%f
> %p'
> recovery_target_timeline = 'latest'
>
> I'm not sure I understand this and if it has anything to do with it, but
> before the connection loss node 1 was using WAL 000000010000000000000005.
> Now "ps aux" on node 1 tells me:
> postgres: startup process waiting for 000000010000000000000006
> Doesn't that mean he is waiting for information from
> 000000010000000000000006 which isn't even used by the master yet, according
> to pg_controldata?

You've configured file based replication also, so when the streaming
rep ended it attempts to get next data from archive and waits until it
exists.

So yes, it is asking for something not created yet, at your request.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew O. Zhukov 2014-01-11 11:46:54 Not fatal error
Previous Message Brian Weaver 2014-01-10 17:47:42 Re: Hot-Standby resync problem after connection loss