Re: Proposal: Adding json logging

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: David Arnold <dar(at)xoe(dot)solutions>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Proposal: Adding json logging
Date: 2018-04-17 14:26:16
Message-ID: 20180417142616.ykw7d6bt2od3e7u3@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

One issue I haven't seen mentioned in this thread is the translation
status of the server message (as well as its encoding): it's possible to
receive messages in some random language if the lc_message setting is
changed. Requiring that lc_messages must always be set to some English
locale seems like a poor answer to this problem.
IMO the untranslated server message should be part of the event also.
I don't know what to think of %-expansions of the message.

The character encoding can be changed per database. Log files where the
encoding differs across databases cannot be processed in any sane way.
You can try some heuristics (try to read each message as utf8 first, and
if that fails, then it must be Latin1! If that doesn't work for you,
... tough luck), but that's a pretty poor answer too. Not sure what is
a good solution to this problem. Maybe ensure that these things are
always UTF8?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-04-17 15:02:07 Re: ON CONFLICT DO UPDATE for partitioned tables
Previous Message Tom Lane 2018-04-17 14:15:38 Re: BUG #15160: planner overestimates number of rows in join when there are more than 200 rows coming from CTE