From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Error with index on unlogged table |
Date: | 2015-12-12 12:30:44 |
Message-ID: | 20151212123044.GD17938@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2015-12-12 13:03:10 | Re: Speed up Clog Access by increasing CLOG buffers |
Previous Message | Michael Paquier | 2015-12-12 12:08:51 | Re: Making tab-complete.c easier to maintain |