Re: pgsql: Add some information about authenticated identity via log_connec

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Add some information about authenticated identity via log_connec
Дата
Msg-id YG05nCI8x8B+Ad3G@paquier.xyz
обсуждение исходный текст
Ответ на pgsql: Add some information about authenticated identity via log_connec  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: Add some information about authenticated identity via log_connec  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Wed, Apr 07, 2021 at 01:17:34AM +0000, Michael Paquier wrote:
> Add some information about authenticated identity via log_connections
>
> The "authenticated identity" is the string used by an authentication
> method to identify a particular user.  In many common cases, this is the
> same as the PostgreSQL username, but for some third-party authentication
> methods, the identifier in use may be shortened or otherwise translated
> (e.g. through pg_ident user mappings) before the server stores it.

So, fairywren, that is able to run the SSL tests on Windows, has been
complaining here:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-04-07 03%3A04%3A44

The issue happens for 4 tests that check if some logs are not
generated in the backend after an authentication failure, but the
origin of the issue is that the truncation of the log file used to
prevent a check of some previous connection's logs does not work
properly, as fairywren shows a full-fledged log file in its output.

The method used by connect_ok() and connect_fails() is the same as
issues_sql_like() in PostgresNode.pm, so it seems to me that there is
a pending issue with the latter, no?  I think that this could lead to
some false positives in tests expecting some general SQL query
patterns, with a risk of overlap.

A safe solution to this stuff is just to rotate the log file once
before restarting the server, like in the attached.  I would do that
just on Windows to not slow down other systems.  Thoughts?
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add some information about authenticated identity via log_connec
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Remove redundant memset(0) calls for page init of some index AMs