pgsql: pg_dump: get rid of die_horribly - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: pg_dump: get rid of die_horribly
Date
Msg-id E1SA75z-0001SK-4w@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
pg_dump: get rid of die_horribly

The old code was using exit_horribly or die_horribly other depending on
whether it had an ArchiveHandle on which to close the connection or not;
but there were places that were passing a NULL ArchiveHandle to
die_horribly, and other places that used exit_horribly while having an
AH available.  So there wasn't all that much consistency.

Improve the situation by keeping only one of the routines, and instead
of having to pass the AH down from the caller, arrange for it to be
present for an on_exit_nicely callback to operate on.

Author: Joachim Wieland
Some tweaks by me

Per a suggestion from Robert Haas, in the ongoing "parallel pg_dump"
saga.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9d23a70d513aa1312135d6cedd444e7e3e933edb

Modified Files
--------------
src/bin/pg_dump/compress_io.c         |   34 ++--
src/bin/pg_dump/dumputils.c           |    6 +
src/bin/pg_dump/nls.mk                |   10 +-
src/bin/pg_dump/pg_backup_archiver.c  |  357 ++++++++++++++++++++-------------
src/bin/pg_dump/pg_backup_archiver.h  |    5 +-
src/bin/pg_dump/pg_backup_custom.c    |  106 +++++-----
src/bin/pg_dump/pg_backup_db.c        |   56 +++---
src/bin/pg_dump/pg_backup_directory.c |   56 +++---
src/bin/pg_dump/pg_backup_null.c      |    4 +-
src/bin/pg_dump/pg_backup_tar.c       |   82 ++++----
src/bin/pg_dump/pg_dump.c             |   13 +-
src/bin/pg_dump/pg_restore.c          |    7 +
12 files changed, 409 insertions(+), 327 deletions(-)


pgsql-committers by date:

Previous
From: Thom Brown
Date:
Subject: Re: pgsql: Update struct Trigger in docs
Next
From: Tom Lane
Date:
Subject: pgsql: Improve the -l (limit) option recently added to contrib/vacuumlo