[postgis-tickets] r16175 - Change syscache stats lookup to use STATRELATTINH key and three parameters in all cases. References #3904
Paul Ramsey
pramsey at cleverelephant.ca
Wed Dec 20 02:57:42 PST 2017
Author: pramsey
Date: 2017-12-20 14:57:42 -0800 (Wed, 20 Dec 2017)
New Revision: 16175
Modified:
trunk/postgis/gserialized_estimate.c
Log:
Change syscache stats lookup to use STATRELATTINH key and three parameters in all cases. References #3904
Modified: trunk/postgis/gserialized_estimate.c
===================================================================
--- trunk/postgis/gserialized_estimate.c 2017-12-20 20:50:58 UTC (rev 16174)
+++ trunk/postgis/gserialized_estimate.c 2017-12-20 22:57:42 UTC (rev 16175)
@@ -935,7 +935,7 @@
if ( ! only_parent )
{
POSTGIS_DEBUGF(2, "searching whole tree stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL");
- stats_tuple = SearchSysCache3(STATRELATT, table_oid, att_num, true);
+ stats_tuple = SearchSysCache3(STATRELATTINH, ObjectIdGetDatum(table_oid), Int16GetDatum(att_num), BoolGetDatum(true));
if ( stats_tuple )
POSTGIS_DEBUGF(2, "found whole tree stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL");
}
@@ -943,7 +943,7 @@
if ( only_parent || ! stats_tuple )
{
POSTGIS_DEBUGF(2, "searching parent table stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL");
- stats_tuple = SearchSysCache2(STATRELATT, table_oid, att_num);
+ stats_tuple = SearchSysCache3(STATRELATTINH, ObjectIdGetDatum(table_oid), Int16GetDatum(att_num), BoolGetDatum(false));
if ( stats_tuple )
POSTGIS_DEBUGF(2, "found parent table stats for \"%s\"", get_rel_name(table_oid)? get_rel_name(table_oid) : "NULL");
}
More information about the postgis-tickets
mailing list