Skip to content

Commit dcf5e31

Browse files
committed
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.
1 parent 4af6e61 commit dcf5e31

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/pl/plpython/plpy_procedure.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
static HTAB *PLy_procedure_cache = NULL;
3030

3131
static PLyProcedure *PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger);
32-
static void invalidate_procedure_caches(Datum arg, int cacheid, uint32 hashvalue);
3332
static bool PLy_procedure_argument_valid(PLyTypeInfo *arg);
3433
static bool PLy_procedure_valid(PLyProcedure *proc, HeapTuple procTup);
3534
static char *PLy_procedure_munge_source(const char *name, const char *src);
@@ -45,29 +44,6 @@ init_procedure_caches(void)
4544
hash_ctl.entrysize = sizeof(PLyProcedureEntry);
4645
PLy_procedure_cache = hash_create("PL/Python procedures", 32, &hash_ctl,
4746
HASH_ELEM | HASH_BLOBS);
48-
CacheRegisterSyscacheCallback(TRFTYPELANG,
49-
invalidate_procedure_caches,
50-
(Datum) 0);
51-
}
52-
53-
static void
54-
invalidate_procedure_caches(Datum arg, int cacheid, uint32 hashvalue)
55-
{
56-
HASH_SEQ_STATUS status;
57-
PLyProcedureEntry *hentry;
58-
59-
Assert(PLy_procedure_cache != NULL);
60-
61-
/* flush all entries */
62-
hash_seq_init(&status, PLy_procedure_cache);
63-
64-
while ((hentry = (PLyProcedureEntry *) hash_seq_search(&status)))
65-
{
66-
if (hash_search(PLy_procedure_cache,
67-
(void *) &hentry->key,
68-
HASH_REMOVE, NULL) == NULL)
69-
elog(ERROR, "hash table corrupted");
70-
}
7147
}
7248

7349
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy