Re: unlogged tables vs. GIST

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: unlogged tables vs. GIST
Дата
Msg-id 3753.1292612842@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: unlogged tables vs. GIST  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: unlogged tables vs. GIST  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: unlogged tables vs. GIST  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Given the foregoing discussion, I see only two possible paths forward here.

> 1. Just decide that that unlogged tables can't have GIST indexes, at
> least until someone figures out a way to make it work.  That's sort of
> an annoying limitation, but I think we could live with it.

> 2. Write WAL records even though the GIST index is supposedly
> unlogged.  We could either (1) write the usual XLOG_GIST_* records,
> and arrange to ignore them on replay when the relation in question is
> unlogged, or (2) write an XLOG_NOOP record to advance the current LSN.
>  The latter sounds safer to me, but it will mean that the XLOG code
> for GIST needs three separate cases (temp, perm, unlogged).  Either
> way we give up a significant chunk of the benefit of making the
> relation unlogged in the first place.

> Thoughts?

IIUC, the problem is that the bufmgr might think that a GIST NSN is an
LSN that should affect when to force out a dirty buffer?  What if we
taught it the difference?  We could for example dedicate a pd_flags
bit to marking pages whose pd_lsn isn't actually an LSN.

This solution would probably imply that all pages in the shared buffer
pool have to have a standard PageHeaderData header, not just an LSN at
the front as is assumed now.  But that doesn't seem like a bad thing to
me, unless maybe we were dumb enough to not use a standard page header
in some of the secondary forks.
        regards, tom lane


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)
Следующее
От: Alex Hunsaker
Дата:
Сообщение: Re: plperlu problem with utf8