Re: Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Proposal for CSN based snapshots
Дата
Msg-id 5371D7DA.3010902@vmware.com
обсуждение исходный текст
Ответ на Re: Proposal for CSN based snapshots  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Proposal for CSN based snapshots  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 05/13/2014 09:44 AM, Amit Kapila wrote:
> On Mon, May 12, 2014 at 7:26 PM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> In theory, we could use a snapshot LSN as the cutoff-point for
>> HeapTupleSatisfiesVisibility(). Maybe it's just because this is new, but
>> that makes me feel uneasy.
>
> To accomplish this won't XID-CSN map table be required and how will
> it be maintained (means when to clear and add a entry to that map table)?

Not sure I understand. The clog is a mapping from XID to CSN. What 
vacuum needs to know is whether the xmin and/or xmax is visible to 
everyone (and whether they committed or aborted). To determine that, it 
needs the oldest still active snapshot LSN. That can be found by 
scanning the proc array. It's pretty much the same as a regular MVCC 
visibility check, but using the oldest still-active snapshot.

- Heikki



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

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: Updating config.guess/config.sub for ppc64le
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Proposal for CSN based snapshots