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 по дате отправления: