Re: Error with index on unlogged table

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Error with index on unlogged table
Дата
Msg-id 20151212123044.GD17938@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Error with index on unlogged table  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2015-12-11 16:54:45 +0900, Michael Paquier wrote:
> +                       if (rel->rd_rel->relpersistence ==
> RELPERSISTENCE_PERMANENT ||
> +                               (rel->rd_rel->relpersistence ==
> RELPERSISTENCE_UNLOGGED &&
> +                                forkNum == INIT_FORKNUM))
> +                               log_smgrcreate(&newrnode, forkNum);
> There should be a XLogIsNeeded() check as well.

RelationCreateStorage(), which creates the main fork, has no such
check. Seems better to stay symmetric, even if it's not strictly
necessary.

> Removing the check on RELPERSISTENCE_UNLOGGED is fine as well... Not
> mandatory though :)

I've gone back and forth on this, I can't really convince myself either
way. We might end up reusing init forks for 'global temporary tables' or
somesuch, so being a bit stricter seems slight better. Anyway, it's of
no actual consequence for now.

Andres



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Making tab-complete.c easier to maintain
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Speed up Clog Access by increasing CLOG buffers