Re: Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal for CSN based snapshots
Дата
Msg-id 5596.1470838147@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal for CSN based snapshots  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Proposal for CSN based snapshots  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> Imagine that you have a stream of normal, synchronous, commits. They get 
> assigned LSNs: 1, 2, 3, 4. They become visible to other transactions in 
> that order.

> The way I described this scheme in the first emails on this thread, was 
> to use the current WAL insertion position as the snapshot. That's not 
> correct, though: you have to use the current WAL *flush* position as the 
> snapshot. Otherwise you would see the results of a transaction that 
> hasn't been flushed to disk yet, i.e. which might still get lost, if you 
> pull the power plug before the flush happens. So you have to use the 
> last flush position as the snapshot.

Uh, what?  That's not the semantics we have today, and I don't see why
it's necessary or a good idea.  Once the commit is in the WAL stream,
any action taken on the basis of seeing the commit must be later in
the WAL stream.  So what's the problem?

> Now, if you do an asynchronous commit, the effects of that should become 
> visible immediately, without waiting for the next flush. You can't do 
> that, if its CSN == LSN.

This distinction is completely arbitrary, and unlike the way it works now.
        regards, tom lane



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Wait events monitoring future development
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Wait events monitoring future development