Re: [HACKERS] Log LDAP "diagnostic messages"?

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [HACKERS] Log LDAP "diagnostic messages"?
Дата
Msg-id CAEepm=03vDdAVraazxHc52CM0V1BJCimYX9Y747KqSqpvGdkiQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Log LDAP "diagnostic messages"?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] Log LDAP "diagnostic messages"?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Sep 20, 2017 at 7:57 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> 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.

Fair point.  In that case there are a few others we should consider
moving down too for consistency, like in the attached.

> 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);

Thanks, that is much tidier.  Done that way in the attached.

Here also is a small addition to your TAP test which exercises the
non-NULL code path because slapd rejects TLS by default with a
diagnostic message.  I'm not sure if this is worth adding, since it
doesn't actually verify that the code path is reached (though you can
see that it is from the logs).

-- 
Thomas Munro
http://www.enterprisedb.com

-- 
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 по дате отправления:

Предыдущее
От: Alvaro Hernandez
Дата:
Сообщение: Re: [HACKERS] Built-in plugin for logical decoding output
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] ICU locales and text/char(n) SortSupport on Windows