updated reset-postgres function