Re: [HACKERS] Metadata about relation creation & full scans.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Metadata about relation creation & full scans.
Дата
Msg-id 20170322144356.ygs3pz6oy5qtgu3h@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Metadata about relation creation & full scans.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Metadata about relation creation & full scans.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2017-03-22 10:14:14 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I propose that for each pg_class entry we start to keep the following
> > additional metadata:
> > - CATALOG_VERSION_NO at relation creation
> > - PG_VERSION_NUM at relation creation
> > - CATALOG_VERSION_NO at last full scan by vacuum
> > - PG_VERSION_NUM at last full scan by vacuum
> 
> (1) It's very very hard for me to believe that we need *two* versions of
> the version number.  Pick one.

PG_VERSION_NUM is probably enough, alright.


> (2) How you gonna update this in vacuum?  It cannot do a transactional
> update.

I think we can just do that in a separate transaction, at the tail end
of vacuum_rel() - if we crash just before that, not that much is lost.
That requires to hand up whether the whole table is scanned, which'd not
be entirely pretty.  Alternatively we could "just" PROC_IN_VACUUM* in
lazy_vacuum_rel(), but that seems like a cure worse than the disease.

Greetings,

Andres Freund



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] increasing the default WAL segment size
Следующее
От: Dave Page
Дата:
Сообщение: Re: [HACKERS] Monitoring roles patch