|From:||Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>|
|To:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|Cc:||Pg Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: Possible micro-optimization in CacheInvalidateHeapTuple|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 10/13/14, 8:28 PM, Tom Lane wrote:
> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
>> CacheInvalidateHeapTuple currently does the following tests first; would there be a performance improvement to testing the system relation case first? We're almost never in bootstrap mode, so that test is almost always a waste. Is there any reason not to switch the two?
>> /* Do nothing during bootstrap */
>> if (IsBootstrapProcessingMode())
>> * We only need to worry about invalidation for tuples that are in system
>> * relations; user-relation tuples are never in catcaches and can't affect
>> * the relcache either.
>> if (!IsSystemRelation(relation))
> You're assuming that IsSystemRelation() is safe to apply during bootstrap
> mode. Even if it is, I don't see the point of messing with this.
> IsBootstrapProcessingMode() is a macro expanding to one comparison
Comment patch to that effect attached.
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com
|Next Message||Craig Ringer||2014-10-22 00:43:20||Re: wal-size limited to 16MB - Performance issue for subsequent backup|
|Previous Message||Tom Lane||2014-10-21 23:05:23||Re: Proposal: Log inability to lock pages during vacuum|