Re: Proposal: More structured logging

Поиск
Список
Период
Сортировка
От Ronan Dunklau
Тема Re: Proposal: More structured logging
Дата
Msg-id 10995044.nUPlyArG6x@aivenronan
обсуждение исходный текст
Ответ на Re: Proposal: More structured logging  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Le mercredi 29 décembre 2021, 14:59:16 CET Justin Pryzby a écrit :
> > Subject: [PATCH v3 2/3] Add test module for the new tag functionality.
>
> ...
>
> > +test_logging(PG_FUNCTION_ARGS)
> > +{
>
> ...
>
> > +     (errmsg("%s", message),
> > +      ({
> > +        forboth(lk, keys, lv, values)
> > +        {
> > +            (errtag(lfirst(lk), "%s", (char *)
lfirst(lv)));
> > +        }})
> > +    ));
>
> The windows build fails with that syntax.
> http://cfbot.cputube.org/ronan-dunklau.html
> https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.157923

Thank you. I switched to an explicit sequence of errstart / errfinish to avoid
putting too much things in nested macro calls. As I don't have any Windows
knowledge, I am very grateful for the new cirrus-ci integration which allowed
me to build on Windows without hassle.

> > Subject: [PATCH v3 3/3] Output error tags in CSV logs
> > +++ b/doc/src/sgml/config.sgml
> > @@ -7370,6 +7371,7 @@ CREATE TABLE postgres_log
> >
> >    backend_type text,
> >    leader_pid integer,
> >    query_id bigint,
> >
> > +  tags jsonb
> >
> >    PRIMARY KEY (session_id, session_line_num)
> >
> >  );
> >  </programlisting>
>
> That's invalid sql due to missing a trailing ",".

Thanks, fixed.

>
> You should also update file-fdw.sgml - which I only think of since we forgot
> in to update it before e568ed0eb and 0830d21f5.  config.sgml should have a
> comment as a reminder to do that.

Done, and I added anoher commit per your suggestion to add this comment.

Thank you for this review.

Regards,

--
Ronan Dunklau
Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Add client connection check during the execution of the query
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side