X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B50C7DA45C for ; Fri, 7 Oct 2005 17:33:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20121-03 for ; Fri, 7 Oct 2005 20:33:02 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0B6FBD9F93 for ; Fri, 7 Oct 2005 17:33:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j97KX0Kh008110; Fri, 7 Oct 2005 16:33:00 -0400 (EDT) To: Chris Hoover Cc: pgsql-admin@postgresql.org Subject: Re: How to check for pg_dump errors? In-reply-to: <1d219a6f0510071313h3aa2c7c6x10bc33d6a7740c3b@mail.gmail.com> References: <1d219a6f0510071313h3aa2c7c6x10bc33d6a7740c3b@mail.gmail.com> Comments: In-reply-to Chris Hoover message dated "Fri, 07 Oct 2005 16:13:50 -0400" Date: Fri, 07 Oct 2005 16:33:00 -0400 Message-ID: <8109.1128717180@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/94 X-Sequence-Number: 19166 Chris Hoover 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