Re: Allow pg_dumpall to use dumpmem.c functions, simplify exit code

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow pg_dumpall to use dumpmem.c functions, simplify exit code
Date: 2011-11-29 21:35:18
Message-ID: 201111292135.pATLZI623135@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Bruce Momjian wrote:
> Bruce Momjian wrote:
> > > I was wondering if it wouldn't make more sense to have pg_dumpall supply
> > > its own version of exit_horribly to avoid separate pg_malloc and
> > > pg_strdup ... but then those routines are so tiny that it hardly makes a
> > > difference.
> > >
> > > Another thing I wondered when seeing the original commit is the fact
> > > that the old code passed the AH to exit_horribly in some places, whereas
> > > the new one simply uses NULL.
> ...
> >
> > I am thinking we should just get rid of the whole AH passing.
> >
> > I have always felt the pg_dump code is overly complex, and this is
> > confirming my suspicion.
>
> I have developed the attached patch which accomplishes this. I was also
> able to move the write_msg function into dumputils.c (which is linked to
> pg_dumpall), which allows pg_dumpall to use the new dumpmem.c functions,
> and I removed its private ones.
>
> FYI, I found write_msg() was a useless valist trampoline so I removed
> the trampoline code and renamed _write_msg() to write_msg(). I also
> modified the MSVC code.

Applied.

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

+ It's impossible for everything to be true. +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-11-29 23:29:34 pgsql: When a row fails a not-null constraint, show row's contents in e
Previous Message Bruce Momjian 2011-11-29 21:35:02 pgsql: Simplify the pg_dump/pg_restore error reporting macros, and allo

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2011-11-29 21:36:26 Re: Inlining comparators as a performance optimisation
Previous Message Bruce Momjian 2011-11-29 21:32:42 Re: Patch - Debug builds without optimization