Re: [PATCH] Make pg_basebackup configure and start standby [Review]

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Date: 2012-11-21 14:28:31
Message-ID: 20121121142831.GB4210@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Boszormenyi Zoltan wrote:
> 2012-11-21 14:19 keltezéssel, Alvaro Herrera írta:
> >Boszormenyi Zoltan wrote:
> >
> >>The problem is that it calls pg_malloc() which is an executable-specific
> >>function. Some of the bin/* executables define it as calling exit(1)
> >>when malloc() returns NULL, some call it with exit(EXIT_FAILURE)
> >>which happens to be 1 but still can be different from the constant 1.
> >>Some executables only define pg_malloc0() but not pg_malloc().
> >It seems simpler to have the escape_quotes utility function in port just
> >not use pg_malloc at all, have it return NULL or similar failure
> >indicator when malloc() fails, and then the caller decides what to do.
>
> $ find . -name "*.c" | xargs grep pg_malloc | grep -v "^pg_malloc" | wc -l
> 277
>
> Too much work for little gain.

I probably wrote the above in a confusing way. I am not suggesting that
pg_malloc is changed in any way.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-11-21 14:29:02 Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Previous Message Tom Lane 2012-11-21 14:23:11 Re: ERROR: volatile EquivalenceClass has no sortref