Re: Add support for logging the current role

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Add support for logging the current role
Дата
Msg-id 4D5D7FCA.2090303@agliodbs.com
обсуждение исходный текст
Ответ на Re: Add support for logging the current role  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert,

> It seems there's at least one more thing to worry about here, which is
> the overhead of this computation when CSV logging is in use.  If no
> SET ROLE or SET SESSION AUTHORIZATION commands are in use, the code
> will call show_role(), which will return "none".  We'll then strcmp()
> that against "none" and decide to call show_session_authorization(),
> which will call strtoul() to find the comma separator and then return
> a pointer to the string that follows it.  Now, none of that is
> enormously expensive, so maybe it's not worth worrying about, but
> since logging can be a hotspot, I thought I'd mention it and solicit
> an opinion on whether that's likely to be a problem in practice.

That seems like enough to need a performance test.  No clear ideas here
on how we'd measure the overhead of that accurately, though.  Suggestions?

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Kerr
Дата:
Сообщение: Re: default_tablespace
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: default_tablespace