FATAL: catalog is missing 1 attribute(s) for relid 2662
Upon database corruption, before doing anything else, one should read https://wiki.postgresql.org/wiki/Corruption and take a file system level backup.

You need to restore from backup or, if backup is missing, check corrupted tables for example

select distinct relname 
from pg_class 
where not exists (select 1 from pg_attribute where attrelid = relfilenode)` 


or

select distinct relname 
from pg_class 
where relfilenode &gt; (select max(attrelid) from pg_attribute) 


And then your need to restore missing record in pg_attribute (for example create simm table and 

copy with q as 
( select attname, atttypid, attstattarget, attlen, attnum, attndims, attcacheoff, atttypmod, attbyval, attstorage,attalign, attnotnull, atthasdef, attisdropped, attislocal, attinhcount, attcollation, attacl, attoptions, attfdwoptions 
  from pg_attribute 
  where attrelid::regclass = your_table::regclass) ) 
 INSERT INTO pg_catalog.pg_attribute select [id from your pgclass missing instead new attrelid], * from q


Then check, that atttypid exists and do vacuum on pg_class and pg_attribute. So, your problem must be solved.