> What version (including minor number)?
On my computer I can reproduce the error with v16.1. At my job I know it's v15 but I can't access it right now so don't know the minor version. In any case, at my job it's much bigger queries we run; I'll elaborate why below.
> Just out of curiosity, WHY do you do this? It's never occurred to me to do that; maybe it's something useful that I've been overlooking.
One yet untested hypothesis is that codd is picking up temporary tables when we deploy that are soon destroyed by the application, and that maybe postgres is running into this error because it executes some of these functions _before_ filtering out temporary relations (WHERE relpersistence <> 't'). This might be possible depending on query plan, I believe. But again, an untested hypothesis.
Hi all,
I can reproduce the error in the subject from time to time when querying catalog tables while DDL is happening concurrently. Here's a bash script that reproduces it (not always, you might have to run it many times until you see ERROR: could not open relation with OID XXXX):
[snip]
I've seen this happen in Production without pg_sleep in the mix, too. I added pg_sleep to the example above only because it makes the error easier to reproduce.
What version (including minor number)?
Is there something I can do to avoid this? Is my understanding of how the catalog tables work wrong?
Just out of curiosity, WHY do you do this? It's never occurred to me to do that; maybe it's something useful that I've been overlooking.
-- Death to America, and butter sauce.
Iraq lobster!