Re: pgsql: Make pg_dumpall build with the right object files under MSVC.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Pg Committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Make pg_dumpall build with the right object files under MSVC.
Date: 2011-11-28 17:48:27
Message-ID: 1322502320-sup-4904@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


Excerpts from Andrew Dunstan's message of lun nov 28 14:40:24 -0300 2011:
>
> On 11/28/2011 11:33 AM, Bruce Momjian wrote:

> > In summary, for those watching, pg_dump and pg_restore used to share
> > OBJS, and with my new patch, dumpmem.c is now shared by those and
> > pg_dumpall. Seems the MSVC code previously could not handle that case,
> > which is fixed by this patch.
>
> Er, no. Only dumputils.c is shared with pg_dumpall. dumpmem.c is not
> (see the Makefile).
>
> The problem that arose is that pg_dumpall has its own (non-static)
> versions of pg_malloc and pg_strdup, so we got duplicate symbol errors
> from the newly declared dumpmem.c functions when we erroneously tried
> linking it in on MSVC.

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.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-11-28 17:51:58 pgsql: Fix some bogosities in pg_dump's foreign-table support.
Previous Message Andrew Dunstan 2011-11-28 17:40:24 Re: pgsql: Make pg_dumpall build with the right object files under MSVC.

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2011-11-28 18:10:40 Re: Patch: add timing of buffer I/O requests
Previous Message Alvaro Herrera 2011-11-28 17:45:06 Re: psql line number reporting from stdin