Re: pg_dump return status..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew <matt(at)ctlno(dot)com>
Cc: "'Anand Raman'" <araman(at)india-today(dot)com>, postgresql <pgsql-general(at)postgresql(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump return status..
Date: 2001-01-05 01:50:09
Message-ID: 26583.978659409@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Matthew <matt(at)ctlno(dot)com> writes:
> I posted a note to the hackers list about this very issue last week. It was
> never responded to. I am prepared to do the work and submit a patch, but I
> wanted some input on how best to do it. We had a problem with a backup
> script silently failing when the disk was full.

Talk to Philip Warner about detecting output write failures. I think
this might be a lot easier in current sources than it would have been in
7.0.* or before; the actual I/O is more centralized, and I think you
could reasonably hope to check for write errors at just a couple of
places. But I'm not sure where the best places are.

>> I find that irrespective of the fact whether pg_dump managed to connect
>> to the db or not the return status ($?) is always zero.

I think this is probably some sort of mistake in your script. pg_dump
certainly returns a nonzero exit status for any failure that it detects,
at least in all the versions I've used. Matthew's correct that it
doesn't detect write failure on its output file, but that's not the
case you're claiming...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luis Fernando Fabara M. 2001-01-05 02:36:05 Cobol TO SQL To PostgreSQL
Previous Message Matt Beauregard 2001-01-05 01:41:27 Re: running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2

Browse pgsql-hackers by date

  From Date Subject
Next Message Luis Fernando Fabara M. 2001-01-05 02:36:05 Cobol TO SQL To PostgreSQL
Previous Message Matt Beauregard 2001-01-05 01:41:27 Re: running pgsql 7 under Jail'ed virtual machine on FreeBSD 4.2