Re: Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Ants Aasma
Тема Re: Proposal for CSN based snapshots
Дата
Msg-id CA+CSw_v_c=DJ3xG5eZkCHwng_1=LTg25DTj5WfGfuqYwg8C39A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal for CSN based snapshots  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
On Wed, Aug 10, 2016 at 7:54 PM, Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> Oh, I found that I underestimated complexity of async commit...  :)
>
> Do I understand right that now async commit right as follows?
> 1) Async transaction confirms commit before flushing WAL.
> 2) Other transactions sees effect of async transaction only when its WAL
> flushed.
> 3) In the session which just committed async transaction, effect of this
> transaction is visible immediately (before WAL flushed). Is it true?

Current code  simplified:

XactLogCommitRecord()
if (synchronous_commit)    XLogFlush()
ProcArrayEndTransaction() // Become visible

The issue we are discussing is that with CSNs, the "become visible"
portion must occur in CSN order. If CSN == LSN, then async
transactions that have their commit record after a sync record must
wait for the sync record to flush and become visible. Simplest
solution is to not require CSN == LSN and just assign a CSN value
immediately before becoming visible.

Regards,
Ants Aasma



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Proposal for CSN based snapshots
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Assertion failure in REL9_5_STABLE