Marc,
In case you don't work out a better way to sort this, I can reproduce and fix the error 'catalog is missing n attribute(s) for relid 16396' caused by directly deleting (part of) pg_attribute:
Setup :
$ initdb $ pg_ctl start $ createdb test
Backup :
$ pg_ctl stop $ tar -czvf pgdata.tar.gz pgdata
Break :
$ pg_ctl start $ psql -d test -c "delete from pg_attribute where attrelid=16396" $ psql test [gets FATAL catalog is missing 20 attribute(s) for relid 16396]
Fix (restore pg_attribute to database test):
$ pg_ctl stop $ tar -zxvf pgdata.tar.gz pgdata/base/17142/1249 $ pg_ctl start $ psql test [now works]
The caveat is that any relations created or modified between the backup and breakage will not be properly restored.
regards
Mark
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend