mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Major patch to speed up backend startup after profiling analysis.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.19 1997/08/19 21:28:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.20 1997/08/24 23:07:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The old interface functions have been converted to macros
|
||||
@@ -695,26 +695,20 @@ heap_getattr(HeapTuple tup,
|
||||
if (attnum > (int) tup->t_natts) {
|
||||
*isnull = true;
|
||||
return ((char *) NULL);
|
||||
} else if (attnum > 0) {
|
||||
/* ----------------
|
||||
* take care of user defined attributes
|
||||
* ----------------
|
||||
*/
|
||||
return fastgetattr(tup, attnum, tupleDesc, isnull);
|
||||
} else {
|
||||
/* ----------------
|
||||
* take care of system attributes
|
||||
* ----------------
|
||||
*/
|
||||
*isnull = false;
|
||||
return heap_getsysattr(tup, b, attnum);
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
* take care of user defined attributes
|
||||
* ----------------
|
||||
*/
|
||||
if (attnum > 0) {
|
||||
char *datum;
|
||||
datum = fastgetattr(tup, attnum, tupleDesc, isnull);
|
||||
|
||||
return (datum);
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
* take care of system attributes
|
||||
* ----------------
|
||||
*/
|
||||
*isnull = false;
|
||||
return
|
||||
heap_getsysattr(tup, b, attnum);
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.13 1997/03/28 07:03:53 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.14 1997/08/24 23:07:26 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <utils/rel.h>
|
||||
#include <utils/tqual.h>
|
||||
#include <storage/bufmgr.h>
|
||||
#include <utils/builtins.h>
|
||||
|
||||
/* ----------------
|
||||
* heap_keytest
|
||||
@@ -53,7 +54,9 @@ heap_keytest(HeapTuple t,
|
||||
return (false);
|
||||
}
|
||||
|
||||
if (keys->sk_flags & SK_COMMUTE)
|
||||
if (keys->sk_func == (func_ptr)oideq) /* optimization */
|
||||
test = (keys->sk_argument == atp);
|
||||
else if (keys->sk_flags & SK_COMMUTE)
|
||||
test = (long) FMGR_PTR2(keys->sk_func, keys->sk_procedure,
|
||||
keys->sk_argument, atp);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user