avoidingpostgresqldatabasecorruption