In our application, we use hibernate + postgres for persistence. Recently, executing one query seems to set Postgres in frenzy mode… The query is a simple 2 table join with extra conditional clauses added for some of the attributes.
On executing them via hibernate session, postgres fails with the exception “Cache lookup failed for function 0” — this is not helpful in anyway!
So, I turned up the postgres logs and found that whenever the “select” query is executed, I see the following in the postgres logs:
"UTC ERROR: XX000: cache lookup failed 0"
"UTC Location: get_func_retset, lsyscache.c:1368"
The funny part is executing the same query via command line does not cause this problem. Has anyone encountered this situation before? If so, how did you resolve it?
Any comments/suggestions highly appreciated!
Thanks
Found the solution. We were creating custom functions/operators in postgres and it so happened that one of the table columns were char instead of varchar. Changing these columns to varchar solved the problem