aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2015-05-12 22:52:18 -0400
committerPeter Eisentraut <peter_e@gmx.net>2015-05-12 22:52:18 -0400
commitdcf5e319089e750d726a0e18a8c90b258c39362c (patch)
treecfbdd5a740dc9a7d66bfb086b44a2e7297ca59a8 /src
parent4af6e61a363246cf7fff3368a76603b0ce9945dd (diff)
downloadpostgresql-dcf5e319089e750d726a0e18a8c90b258c39362c.tar.gz
postgresql-dcf5e319089e750d726a0e18a8c90b258c39362c.zip
PL/Python: Remove procedure cache invalidation
This was added to react to changes in the pg_transform catalog, but building with CLOBBER_CACHE_ALWAYS showed that PL/Python was not prepared for having its procedure cache cleared. Since this is a marginal use case, and we don't do this for other catalogs anyway, we can postpone this to another day.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/plpy_procedure.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/pl/plpython/plpy_procedure.c b/src/pl/plpython/plpy_procedure.c
index 858cecc64d2..00405f0adac 100644
--- a/src/pl/plpython/plpy_procedure.c
+++ b/src/pl/plpython/plpy_procedure.c
@@ -29,7 +29,6 @@
static HTAB *PLy_procedure_cache = NULL;
static PLyProcedure *PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger);
-static void invalidate_procedure_caches(Datum arg, int cacheid, uint32 hashvalue);
static bool PLy_procedure_argument_valid(PLyTypeInfo *arg);
static bool PLy_procedure_valid(PLyProcedure *proc, HeapTuple procTup);
static char *PLy_procedure_munge_source(const char *name, const char *src);
@@ -45,29 +44,6 @@ init_procedure_caches(void)
hash_ctl.entrysize = sizeof(PLyProcedureEntry);
PLy_procedure_cache = hash_create("PL/Python procedures", 32, &hash_ctl,
HASH_ELEM | HASH_BLOBS);
- CacheRegisterSyscacheCallback(TRFTYPELANG,
- invalidate_procedure_caches,
- (Datum) 0);
-}
-
-static void
-invalidate_procedure_caches(Datum arg, int cacheid, uint32 hashvalue)
-{
- HASH_SEQ_STATUS status;
- PLyProcedureEntry *hentry;
-
- Assert(PLy_procedure_cache != NULL);
-
- /* flush all entries */
- hash_seq_init(&status, PLy_procedure_cache);
-
- while ((hentry = (PLyProcedureEntry *) hash_seq_search(&status)))
- {
- if (hash_search(PLy_procedure_cache,
- (void *) &hentry->key,
- HASH_REMOVE, NULL) == NULL)
- elog(ERROR, "hash table corrupted");
- }
}
/*