Re: Transaction Snapshots and Hot Standby

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Transaction Snapshots and Hot Standby
Дата
Msg-id 48C91AF0.7010804@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Transaction Snapshots and Hot Standby  (Csaba Nagy <nagy@ecircle-ag.com>)
Ответы Re: Transaction Snapshots and Hot Standby
Re: Transaction Snapshots and Hot Standby
Список pgsql-hackers
Csaba Nagy wrote:
> On Thu, 2008-09-11 at 15:42 +0300, Heikki Linnakangas wrote:
>> One problem with this, BTW, is that if there's a continuous stream of 
>> medium-length transaction in the slave, each new snapshot taken will 
>> prevent progress in the WAL replay, so the WAL replay will advance in 
>> "baby steps", and can fall behind indefinitely.
> 
> Why would it fall behind indefinitely ? It only should fall behind to
> the "blocking horizon", which should be the start of the longest
> currently running transaction... which should be continually advancing
> and not too far in the past if there are only medium length transactions
> involved.

Well, yes, but you can fall behind indefinitely that way. Imagine that 
each transaction on the slave lasts, say 10 minutes, with a new 
transaction starting every 5 minutes. On the master, there's a table 
that's being vacuumed (or HOT-updated) frequently, say after each 
transaction for simplicity. What can happen is that every transaction 
that finishes on the slave will only let the WAL replay advance by one 
XID before blocking on the snapshot of the next slave transaction. The 
WAL replay will advance at a rate of 0.2 TPM, while the master is 
generating 1.0 TPM.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: "Jochem van Dieten"
Дата:
Сообщение: Re: Transaction Snapshots and Hot Standby
Следующее
От: "Robert Haas"
Дата:
Сообщение: Re: Transaction Snapshots and Hot Standby