Re: changeset generation v5-01 - Patches & git tree

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: changeset generation v5-01 - Patches & git tree
Дата
Msg-id 20130707173731.GC2062@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: changeset generation v5-01 - Patches & git tree  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: changeset generation v5-01 - Patches & git tree  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2013-06-28 21:47:47 +0200, Andres Freund wrote:
> So, from what I gather there's a slight leaning towards *not* storing
> the relation's oid in the WAL. Which means the concerns about the
> uniqueness issues with the syscaches need to be addressed. So far I know
> of three solutions:
> 1) develop a custom caching/mapping module
> 2) Make sure InvalidOid's (the only possible duplicate) can't end up the
>    syscache by adding a hook that prevents that on the catcache level
> 3) Make sure that there can't be any duplicates by storing the oid of
>    the relation in a mapped relations relfilenode

So, here's 4 patches:
1) add RelationMapFilenodeToOid()
2) Add pg_class index on (reltablespace, relfilenode)
3a) Add custom cache that maps from filenode to oid
3b) Add catcache 'filter' that ensures the cache stays unique and use
    that for the mapping
4) Add pg_relation_by_filenode() and use it in a regression test

3b) adds an optional 'filter' attribute to struct cachedesc in
    syscache.c which is then passed to catcache.c. If it's existant
    catcache.c uses it - after checking for a match in the cache - to
    check whether the queried-for value possibly should end up in the
    cache. If not it stores a whiteout entry as currently already done
    for nonexistant entries.
    It also reorders some catcache.h struct attributes to make sure
    we're not growing them. Might make sense to apply that
    independently, those are rather heavily used.

I slightly prefer 3b) because it's smaller, what's your opinions?

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: strange IS NULL behaviour
Следующее
От: Markus Wanner
Дата:
Сообщение: Re: Review: extension template