Re: pgsql: Properly detect read and write errors in pg_dump/dumpall, and pg

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Properly detect read and write errors in pg_dump/dumpall, and pg
Date: 2014-05-06 16:21:20
Message-ID: 20140506162120.GD30817@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, May 6, 2014 at 05:52:59PM +0200, Andres Freund wrote:
> On 2014-05-06 00:27:21 +0000, Bruce Momjian wrote:
> > Properly detect read and write errors in pg_dump/dumpall, and pg_restore
> >
> > Previously some I/O errors were ignored.
>
> My compiler complains about this with:
>
> /home/andres/src/postgresql/src/bin/pg_dump/pg_backup_tar.c: In function ‘_tarReadRaw’:
> /home/andres/src/postgresql/src/bin/pg_dump/pg_backup_archiver.h:48:19: warning: passing argument 1 of ‘gzeof’ from incompatible pointer type
> #define GZEOF(fh) gzeof(fh)
> ^
> /home/andres/src/postgresql/src/bin/pg_dump/pg_backup_tar.c:561:24: note: in expansion of macro ‘GZEOF’
> if (res != len && !GZEOF(fh))
> ^
> In file included from /home/andres/src/postgresql/src/bin/pg_dump/pg_backup_archiver.h:44:0,
> from /home/andres/src/postgresql/src/bin/pg_dump/pg_backup_tar.c:32:
> /usr/include/zlib.h:1475:21: note: expected ‘gzFile’ but argument is of type ‘struct FILE *’
> ZEXTERN int ZEXPORT gzeof OF((gzFile file));
> ^
> You're passing fh to GZEOF instead of th->zFH if I see that correctly.

There were a few bugs, all fixed. Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-05-06 17:32:02 Re: pgsql: Again fix initialization of auto-tuned effective_cache_size.
Previous Message Bruce Momjian 2014-05-06 16:20:57 pgsql: Fix improperly passed file descriptors