Re: BUG #16049: log_line_prefix=%a and log_connections -application_name missing

Поиск
Список
Период
Сортировка
От death lock
Тема Re: BUG #16049: log_line_prefix=%a and log_connections -application_name missing
Дата
Msg-id CAO5GjwHNmawCgbSiG22UdV8MBtHtL91M83THgZDa4tGHhsBfHg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16049: log_line_prefix=%a and log_connections - application_name missing  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
"will do what you want." Not exactly - I want it to appear according
to my log_line_prefix - 4 ex. ='%t|%p|%a|%d|%u|%h| '
I've used that patch on 9.5.19

In elog.c there's    : const char *appname = application_name;  // line 2357
other cases have : const char *username = MyProcPort->user_name;
After adding 'MyProcPort->' to %a case  '|psql|' shows up like I
wanted .. but connection process Segfaults :/

I've tracked it to postinit.c - process_startup_options() - this loop
:  while (gucopts) {...}

gucopts = list_head(port->guc_options);
ereport(LOG, (errmsg(" +++ process_startup_options : [%s] ",
gucopts)));  // adding this line returns :

2019-10-15 14:28:03 CEST|9760|psql|postgres|postgres|[local]|
LOCATION:  PerformAuthentication, postinit.c:257
2019-10-15 14:28:03 CEST|9760|psql|postgres|postgres|[local]| LOG:
00000:  +++ process_startup_options : [local        all
all                                     trust]
2019-10-15 14:28:03 CEST|9760|psql|postgres|postgres|[local]|
LOCATION:  process_startup_options, postinit.c:1066

Sorry 4 nagging , any pointers much appreciated

On 10/11/19, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> This was changed about a year ago, see
>
> https://www.postgresql.org/message-id/flat/CAHJZqBB_Pxv8HRfoh%2BAB4KxSQQuPVvtYCzMg7woNR3r7dfmopw%40mail.gmail.com
>
> so v12 will do what you want.
>
>             regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16058: show session_user shows a not clear error message
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes