I have a stored procedure in Redshift that is loading data from a bunch of S3 JSON files in a loop. Every time a file is loaded, its name is stored into a log table on Redshift side so i can link it to records in my staging tables, which i also use to avoid loading same file twice. Any error during the loading is also recorded. Anyways, everything worked fine for some time, but during the last run, I got following error (this is the exact error message):
catalog is missing 1 attribute(s) for relid 5477788
Checking AWS documentation for Redshift, and looking into tables STL_ERROR, STL_LOAD_ERRORS, SVL_STORED_PROC_MESSAGES, SVL_STORED_PROC_CALL, pg_class did not clarify anything. Any googling points only to PostgreSQL mentioning possible database corruption. I know that Redshift is based on PostgreSQL, but, how can i check it specifically for Redshift, that my database or table(s) are not corrupted? Has anyone encountered similar error in Redshift before?