Evan Walter <ewalter@decisionanalyst.com> writes:
> Not sure what is causing this. When we execute:
> CREATE TEMPORARY TABLE test(test_code varchar (255))
> We get
> ERROR: could not read block 6 in file "global/... " read only 0 of 8192
> bytes
What's the exact filename you omitted there, and which PG version is this?
I'm guessing this indicates corruption of pg_shdepend or one of its
indexes, as that seems like the only shared catalog that's really likely
to get touched during a CREATE TEMP TABLE. If you're lucky, it's one of
the indexes, and a REINDEX will fix it.
Have you had any OS-level crashes lately, power failures, etc? Whatever
is corrupted exactly, this shouldn't have happened if filesystem integrity
was being maintained properly.
regards, tom lane