Re: [PATCH] Make pg_basebackup configure and start standby [Review] - Mailing list pgsql-hackers

From Boszormenyi Zoltan
Subject Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Date
Msg-id 50E32A46.8060000@cybertec.at
Whole thread Raw
In response to Re: [PATCH] Make pg_basebackup configure and start standby [Review]  (Magnus Hagander <magnus@hagander.net>)
Responses Re: [PATCH] Make pg_basebackup configure and start standby [Review]
List pgsql-hackers
2013-01-01 17:18 keltezéssel, Magnus Hagander írta:

On Fri, Nov 30, 2012 at 10:13 AM, Boszormenyi Zoltan <zb@cybertec.at> wrote:
Hi,

now that PQconninfo() was committed, I rebased the subsequent
patches. Actual code change was only in the last patch, to
conform to the committed PQconninfo() API.

So, finally coming back to this one.

What happened to Alvaro's suggestion of:

> 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.

I seem to have skipped it while reading my mails,
I don't remember this suggestion at all. Sorry.


That way we can get around the whole need for changing memory allocation across all the frontends, no? Like the attached.

Sure it's simpler but then the consistent look of the code is lost.

What about the other patch to unify pg_malloc and friends?
Basically all client code boils down to
    fprintf(stderr, ...)
in different disguise in their error reporting, so that patch can
also be simplified but it seems that the atexit() - either explicitly
or hidden behind InitPostgresFrontend() - cannot be avoided.

Best regards,
Zoltán Böszörményi

-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de     http://www.postgresql.at/

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Next
From: Noah Misch
Date:
Subject: Re: default SSL compression (was: libpq compression)