Re: Re: [pgadmin-support] Issue with a hanging apply process on the replica db after vacuum works on primary

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Sergey Shchukin <shchukin(dot)s(dot)a(at)gmail(dot)com>, Radovan Jablonovsky <radovan(dot)jablonovsky(at)replicon(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: [pgadmin-support] Issue with a hanging apply process on the replica db after vacuum works on primary
Date: 2015-03-05 08:25:42
Message-ID: 54F81306.9060404@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin pgsql-general pgsql-hackers pgsql-performance

On 2/27/15 5:11 AM, Sergey Shchukin wrote:
>
> show max_standby_streaming_delay;
> max_standby_streaming_delay
> -----------------------------
> 30s

We both need to be more clear about which server we're talking about
(master or replica).

What are max_standby_streaming_delay and max_standby_archive_delay set
to *on the replica*?

My hope is that one or both of those is set to somewhere around 8
minutes on the replica. That would explain everything.

If that's not the case then I suspect what's happening is there's
something running on the replica that isn't checking for interrupts
frequently enough. That would also explain it.

When replication hangs, is the replication process using a lot of CPU?
Or is it just sitting there? What's the process status for the replay
process show?

Can you get a trace of the replay process on the replica when this is
happening to see where it's spending all it's time?

How are you generating these log lines?
Tue Feb 24 15:05:07 MSK 2015 Stream: MASTER-masterdb:79607161592048
SLAVE:79607161550576 Replay:79607160986064 :: REPLAY 592 KBytes
(00:00:00.398376 seconds)

Do you see the confl_* fields in pg_stat_database_conflicts on the
*replica* increasing?
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2015-03-05 08:53:04 Re: Re: Unknown token in connection string
Previous Message Prasad 2015-03-04 22:54:17 Re: Unknown token in connection string

Browse pgsql-admin by date

  From Date Subject
Next Message Josef Springer 2015-03-05 10:08:32 Re: Installing PostgreSQL fails
Previous Message Ville Rantamaula 2015-03-04 11:01:32 Re: PostgreSQL with BDR. Problems when adding a sequence in a table column

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2015-03-05 08:34:36 Re: The slave suddenly stopped with such DB log : "will not overwrite a used ItemId" and "heap_insert_redo: failed to add tuple"
Previous Message Alban Hertroys 2015-03-05 07:54:29 Re: Postgres not using GiST index in a lateral join

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-03-05 10:10:08 Re: Table-level log_autovacuum_min_duration
Previous Message Fujii Masao 2015-03-05 08:22:28 Re: WALWriter active during recovery

Browse pgsql-performance by date

  From Date Subject
Next Message Sven R. Kunze 2015-03-05 09:17:51 Re: Reverse Key Index
Previous Message Marc Mamin 2015-03-04 20:10:56 Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT