Re: How to check for pg_dump errors?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Hoover <revoohc(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to check for pg_dump errors?
Date: 2005-10-07 20:33:00
Message-ID: 8109.1128717180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Chris Hoover <revoohc(at)gmail(dot)com> writes:
> Silly question, but in a shell script, what is the best way to check for a
> pg_dump problem? I'm working on reworking our backup methodology, and want
> to make sure that if pg_dump can't dump a db, we page the on call db. Does
> it return any sort of exit code indicating it was not successful dumping a
> database?

pg_dump should return nonzero exit code on failure. (At least in recent
releases ... not sure about how far back that's been done consistently.)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2005-10-07 20:49:46 Re: How to check for pg_dump errors?
Previous Message Chris Hoover 2005-10-07 20:13:50 How to check for pg_dump errors?