Re: [HACKERS] Log LDAP "diagnostic messages"? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Log LDAP "diagnostic messages"?
Date
Msg-id 09ad0092-f026-3957-4599-c57ad1dca79c@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Log LDAP "diagnostic messages"?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [HACKERS] Log LDAP "diagnostic messages"?  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On 9/15/17 08:43, Thomas Munro wrote:
> On Fri, Sep 15, 2017 at 2:12 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>> I think the ldap_unbind() changes should be in a separate preliminary
>> patch to be committed separately and backpatched.
> 
> OK, here it is split into two patches.

I've looked this over.

In the 0001 patch, I would move the ldap_unbind() calls after the
ereport(LOG) calls.  We do all the other resource cleanup (pfree() etc.)
after the ereport() calls, so it would be weird to do this one
differently.  Also, in the second patch you move one of the
ldap_unbind() calls down anyway.

In the 0002 patch, I think this is a bit repetitive and could be
refactored even more.  The end result could look like
   ereport(LOG,           (errmsg("blah"),            errdetail_for_ldap(ldap)));   ldap_unbind(ldap);

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] Show backtrace when tap tests fail
Next
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] Re: proposal - psql: possibility to specify sort fordescribe commands, when size is printed