Possible micro-optimization in CacheInvalidateHeapTuple

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Possible micro-optimization in CacheInvalidateHeapTuple
Date: 2014-10-13 22:53:49
Message-ID: 543C57FD.9010100@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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())
return;

/*
* 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))
return;
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-10-13 23:02:30 Re: missing tab-completion for relation options
Previous Message Alvaro Herrera 2014-10-13 21:17:54 Re: pg_dump refactor patch to remove global variables