PGPOOL_SET_CACHE(1)
π PGPOOL SET CACHE β the manual page, but make it make sense π
okay bestie, sit down, we're learning PGPOOL SET CACHE from pgpool-II 4.7.2 and honestly? it's giving one-job-wonder and I respect it. β¨
πΈ NAME πΈ
PGPOOL_SET_CACHE β delete query cache ποΈβ¨
π SYNOPSIS π
PGPOOL SET CACHE DELETE 'query'
that's it. that's the whole thing. one command, one job, iconic behavior honestly π
π¦ DESCRIPTION π¦
so the PGPOOL SET CACHE DELETE command deletes the query cache that was previously created by the query. like, it goes and finds that exact cache entry and says bye bye π
but here's the catch, and it's a real one: the query string has to be exactly identical to the previous query, including the trailing ;. not "close enough". not "spiritually the same". exactly. same characters, same whitespace, same everything. no cap.
and if the query has a ' (single quote) in it? bestie, you gotta prefix it with another ' like this:
PGPOOL SET CACHE DELETE 'SELECT ''FOO'';';
see how the inner quotes got doubled? that's the move π«Ά
this command is particularly useful for queries that the auto cache invalidation feature justβ¦ doesn't invalidate, because the query doesn't reference any tables at all. auto-invalidation can't touch what it can't see, and our girl PGPOOL SET CACHE DELETE is here to clean up π
now, if you don't remember the previous query (been there, lowkey), you can use pcp_invalidate_query_cache(1) to nuke all the query cache β including the one you actually wanted gone. but heads up: that one requires the Pgpool-II admin privilege π
when the deletion works, this command throws you a notice message:
NOTICE: query cache deleted. query: "query string"
and if the cache doesn't exist, or query cache isn't even enabled, it hits you with:
NOTICE: query cache does not exist for query: "query string"
still a notice, still cute, just telling you there was nothing to delete π
β EXAMPLES β
oops, you accidentally created an unwanted query cache? yeah. happens. delete it with the command, bestie:
test=# /*FORCE QUERY CACHE*/SELECT current_timestamp;
current_timestamp
-------------------------------
2024-10-18 18:25:07.826423+09
(1 row)
test=# PGPOOL SET CACHE DELETE '/*FORCE QUERY CACHE*/SELECT current_timestamp;';
NOTICE: query cache deleted. query: "/*FORCE QUERY CACHE*/SELECT current_timestamp;"
SET
ate. no crumbs left π
π SEE ALSO π
sign-off time π this whole thing comes from pgpool-II 4.7.2, dated 2023, and it lives under the manual name PGPOOL SET CACHE(1). go forth and delete your caches responsibly, queen ππ
π¦ where this page comes from
- ubuntu stonking: pgpool2 4.7.2-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms