[postgis-tickets] r16189 - Change new cache behavior to require > 9.6 instead of > 9.5, the AllocSetContextCreate structure in 9.5 doesn't support ALLOCSET_SMALL_SIZES macro so would otherwise require more ugly ifdefing.
Regina Obe
lr at pcorp.us
Wed Dec 27 07:23:29 PST 2017
Author: robe
Date: 2017-12-27 07:23:29 -0800 (Wed, 27 Dec 2017)
New Revision: 16189
Modified:
trunk/extensions/address_standardizer/std_pg_hash.c
trunk/libpgcommon/lwgeom_transform.c
trunk/postgis/lwgeom_geos_prepared.c
Log:
Change new cache behavior to require > 9.6 instead of > 9.5, the AllocSetContextCreate structure in 9.5 doesn't support ALLOCSET_SMALL_SIZES macro so would otherwise require more ugly ifdefing.
Closes #3950
Modified: trunk/extensions/address_standardizer/std_pg_hash.c
===================================================================
--- trunk/extensions/address_standardizer/std_pg_hash.c 2017-12-26 14:07:49 UTC (rev 16188)
+++ trunk/extensions/address_standardizer/std_pg_hash.c 2017-12-27 15:23:29 UTC (rev 16189)
@@ -113,7 +113,7 @@
static void
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
StdCacheDelete(MemoryContext context)
{
@@ -140,7 +140,7 @@
DeleteStdHashEntry(context);
}
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
static void
StdCacheInit(MemoryContext context)
@@ -194,7 +194,7 @@
#endif
};
-#endif /* POSTGIS_PGSQL_VERSION < 95 */
+#endif /* POSTGIS_PGSQL_VERSION < 96 */
uint32
@@ -383,7 +383,7 @@
DBG("Adding item to STD cache ('%s', '%s', '%s') index %d", lextab, gaztab, rultab, STDCache->NextSlot);
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
STDMemoryContext = MemoryContextCreate(T_AllocSetContext, 8192,
&StdCacheContextMethods,
STDCache->StdCacheContext,
Modified: trunk/libpgcommon/lwgeom_transform.c
===================================================================
--- trunk/libpgcommon/lwgeom_transform.c 2017-12-26 14:07:49 UTC (rev 16188)
+++ trunk/libpgcommon/lwgeom_transform.c 2017-12-27 15:23:29 UTC (rev 16189)
@@ -89,7 +89,7 @@
static void
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
PROJ4SRSCacheDelete(MemoryContext context)
{
#else
@@ -113,7 +113,7 @@
DeletePJHashEntry(context);
}
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
static void
PROJ4SRSCacheInit(MemoryContext context)
@@ -182,7 +182,7 @@
#endif
};
-#endif /* POSTGIS_PGSQL_VERSION < 95 */
+#endif /* POSTGIS_PGSQL_VERSION < 96 */
/*
* PROJ4 projPJ Hash Table functions
@@ -534,7 +534,7 @@
*/
POSTGIS_DEBUGF(3, "adding SRID %d with proj4text \"%s\" to query cache at index %d", srid, proj_str, PROJ4Cache->PROJ4SRSCacheCount);
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
PJMemoryContext = MemoryContextCreate(T_AllocSetContext, 8192,
&PROJ4SRSCacheContextMethods,
PROJ4Cache->PROJ4SRSCacheContext,
Modified: trunk/postgis/lwgeom_geos_prepared.c
===================================================================
--- trunk/postgis/lwgeom_geos_prepared.c 2017-12-26 14:07:49 UTC (rev 16188)
+++ trunk/postgis/lwgeom_geos_prepared.c 2017-12-27 15:23:29 UTC (rev 16189)
@@ -96,7 +96,7 @@
static void
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
PreparedCacheDelete(MemoryContext context)
{
#else
@@ -125,7 +125,7 @@
DeletePrepGeomHashEntry(context);
}
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
static void
PreparedCacheInit(MemoryContext context)
{
@@ -192,7 +192,7 @@
#endif
};
-#endif /* POSTGIS_PGSQL_VERSION < 95 */
+#endif /* POSTGIS_PGSQL_VERSION < 96 */
@@ -313,7 +313,7 @@
if ( ! prepcache->context_callback )
{
PrepGeomHashEntry pghe;
-#if POSTGIS_PGSQL_VERSION < 95
+#if POSTGIS_PGSQL_VERSION < 96
prepcache->context_callback = MemoryContextCreate(T_AllocSetContext, 8192,
&PreparedCacheContextMethods,
prepcache->context_statement,
More information about the postgis-tickets
mailing list