Re: Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Proposal for CSN based snapshots
Дата
Msg-id 53FC6545.7000501@vmware.com
обсуждение исходный текст
Ответ на Re: Proposal for CSN based snapshots  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Proposal for CSN based snapshots  (Jeff Davis <pgsql@j-davis.com>)
Re: Proposal for CSN based snapshots  (Greg Stark <stark@mit.edu>)
Re: Proposal for CSN based snapshots  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On 08/26/2014 12:03 PM, Jeff Davis wrote:
> On Fri, 2014-06-13 at 13:24 +0300, Heikki Linnakangas wrote:
>> Attached is a new patch. It now keeps the current pg_clog unchanged, but
>> adds a new pg_csnlog besides it. pg_csnlog is more similar to
>> pg_subtrans than pg_clog: it's not WAL-logged, is reset at startup, and
>> segments older than GlobalXmin can be truncated.
>
> It appears that this patch weakens the idea of hint bits. Even if
> HEAP_XMIN_COMMITTED is set, it still needs to find out if it's in the
> snapshot.
>
> That's fast if the xid is less than snap->xmin, but otherwise it needs
> to do a fetch from the csnlog, which is exactly what the hint bits are
> designed to avoid. And we can't get around this, because the whole point
> of this patch is to remove the xip array from the snapshot.

Yeah. This patch in the current state is likely much much slower than 
unpatched master, except in extreme cases where you have thousands of 
connections and short transactions so that without the patch, you spend 
most of the time acquiring snapshots.

My current thinking is that access to the csnlog will need to be made 
faster. Currently, it's just another SLRU, but I'm sure we can do better 
than that. Or add a backend-private cache on top of it; that might 
already alleviate it enough..

- Heikki




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

Предыдущее
От: "Erik Rijkers"
Дата:
Сообщение: Re: Final Patch for GROUPING SETS - unrecognized node type: 347
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: replication commands and log_statements