I have a large table (audit) in which I store relation ID of the schema and table.
This is conveniently populated by trigger using TG_RELID.
It is also convenient because I can index it and the index would be smaller than if I were to store "schema"(text) and "table"(text) columns separately and index them.
Also, I can then do queries using WHERE relation_id = 'myschema:mytable'::regclass
and it just works.
My question is if this is "safe" to do in terms of backup/restore (will the schema.table have the same regclass/oid in target server and it did in the source server?
Any other issue I should be aware of?