Re: Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Proposal for CSN based snapshots
Дата
Msg-id 5370F37F.4060104@vmware.com
обсуждение исходный текст
Ответ на Re: Proposal for CSN based snapshots  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Proposal for CSN based snapshots  (Andres Freund <andres@2ndquadrant.com>)
Re: Proposal for CSN based snapshots  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On 05/12/2014 06:26 PM, Andres Freund wrote:
>> >With the new "commit-in-progress" status in clog, we won't need the
>> >sub-committed clog status anymore. The "commit-in-progress" status will
>> >achieve the same thing.
> Wouldn't that cause many spurious waits? Because commit-in-progress
> needs to be waited on, but a sub-committed xact surely not?

Ah, no. Even today, a subxid isn't marked as sub-committed, until you 
commit the top-level transaction. The sub-commit state is a very 
transient state during the commit process, used to make the commit of 
the sub-transactions and the top-level transaction appear atomic. The 
commit-in-progress state would be a similarly short-lived state. You 
mark the subxids and the top xid as commit-in-progress just before the 
XLogInsert() of the commit record, and you replace them with the real 
LSNs right after XLogInsert().

- Heikki



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Proposal for CSN based snapshots
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Archive recovery won't be completed on some situation.