Re: Replication: slave is in permanent startup 'recovery'

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Replication: slave is in permanent startup 'recovery'
Date: 2011-04-14 18:43:40
Message-ID: 4DA7405C.8050103@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dne 14.4.2011 10:01, Craig Ringer napsal(a):
> That's a limitation of streaming replication. It's a lot like the issue
> Oracle has with running out of undo or redo log space. Essentially, my
> understanding is that the hot standby server cannot replay WAL archives
> to keep up with the master's changes at the same time as running
> queries. To avoid getting too far behind the master because of a huge or
> stuck query, it'll cancel very long-running queries.
>
> Again from my limited understanding, the reason it can't replay WAL is
> because the WAL records include overwrites of pages VACUUMed and re-used
> on the master. HS is block-level replication; it cannot keep a page
> in-place on the slave when the master has erased or overwritten it.

I guess it's worth mentioning there's another solution to this problem,
implemented in 9.1 - it's called feedback. That means the standby asks
the primary not to overwrite the blocks - see this

http://developer.postgresql.org/pgdocs/postgres/hot-standby.html#HOT-STANDBY-CONFLICT

But obviously this is not for free - you have to pay a price, in this
case a bloat on the primary (as it can't do VACUUM properly).

regards
Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2011-04-14 18:54:29 Re: SSDs with Postgresql?
Previous Message David Kerr 2011-04-14 18:31:05 Calculating memory allocaiton per process