PG Bug reporting form <noreply@postgresql.org> writes:
> Randomly, we see this error in the logs:
> 2021-03-18 07:52:32 UTC-6052fa73.12638-ERROR: cache lookup failed for type
> 0
> Our process is as follows ( pseudo code simplified ):
> begin trans;
> call a procedure that drops and re-creates a table.
> commit;
> begin trans
> loop 1000 rows
> insert into table above....
> end loop;
> commit;
Hm. Can you provide a self-contained test case?
It'd also be worth your time to update to latest 10.x, in case this is
an already-fixed bug. A quick trawl of the commit logs didn't turn up
an obvious match, but I might have missed a relevant fix.
https://wiki.postgresql.org/wiki/Guide_to_reporting_problems
regards, tom lane