basic postgres recovery script