Repairing clog corruptions
Yesterday, i got a page from a client about a possible corruption issue to one of his clients, so i decided to share how i dealt with it. Before starting with how i approached the problem, i want to say that corruptions don't just happen in postgres, in OmniTI , we manage A LOT of databases, all with different major versions and in different operating systems and in my time, I haven't seen (many) cases that corruption happened because of a postgres bug (i've seen indexes getting corrupted but i don't remember ever seeing data being corrupted). What i want to say is that corruptions don't just happen, hardware failures, power outages, disks getting full are common reasons for corruptions. A replica and backups should always be in place and the server should be properly monitored. Unfortunately this server was not managed by us so none of the above was in place.. At first I saw in the logs entries like : From the logs: 2016-05-18 15:50:06 EDT::@:[10191]: ER