Pivotal Knowledge Base

Follow

Greenplum Error: "RelfileNode XXX Already in Use in "pg_class""

Environment

 Product  Version
 Pivotal Greenplum  All
 OS  All Supported OS

Symptom

Sometimes, when we create or truncate a table, the action can fail because the Relfilenode generated has already been used.

Error Message:

Relfilenode xxx already in use in "pg_class"

Cause
There is a sequence, called pg_highest_oid inside the database that is shared by Relfilenode and OID. A Relfilenode value in pg_class will be generated or updated when a table is created or truncated. If this Relfilenode has been used by another table, then the error is generated.

Solution
Generally, re-running create/truncate will solve this issue.
We can also use the following query to check the current sequence number:

testDB=# select pg_highest_oid();
pg_highest_oid
----------------
70203
(1 row)

 

 

Comments

Powered by Zendesk