Eric Marsden <eric.marsden@risk-engineering.org> writes:
> I see a PostgreSQL error "cache lookup failed for type 34813" after the
> following sequence of network requests over a single network connection
> to PostgreSQL (which is otherwise idle):
> CREATE TYPE rating AS ENUM('ungood', 'good')
> CREATE TABLE act(name TEXT, value RATING)
> INSERT INTO act VALUES('thoughtcrime', 'ungood') -- OK
> INSERT INTO act VALUES('blackwhite', $1) -- with $1 = "good" / type oid for "rating" / text format
Interesting. To clarify, are these commands run within a single
transaction, and if not where are the transaction boundaries?
Would you run this under log_error_verbosity = verbose and post the
full postmaster log entry for the failure, especially the LOCATION
data? (Even better would be a stack trace from the errfinish call,
but perhaps LOCATION will be enough.)
regards, tom lane