Re: BUG #5661: The character encoding in logfile is confusing.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, tkbysh2000(at)yahoo(dot)co(dot)jp, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: BUG #5661: The character encoding in logfile is confusing.
Date: 2010-09-22 13:41:42
Message-ID: 23765.1285162902@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> On 22/09/2010 5:45 PM, Peter Eisentraut wrote:
>> We need to produce the log output in the server encoding, because that's
>> how we need to send it to the client.

> That doesn't mean it can't be recoded for writing to the log file,
> though. Perhaps it needs to be. It should be reasonably practical to
> detect when the database and log encoding are the same and avoid the
> transcoding performance penalty, not that it's big anyway.

We have seen ... and rejected ... such proposals before. The problem is
that "transcode to some other encoding" is not a simple and guaranteed
error-free operation. As an example, if you choose to name some table
using a character that doesn't exist in the log encoding, you have just
ensured that no message about that table will ever get to the log.
Nice way to hide your activities from the DBA ;-) Transcoding also
eats memory, which might be in exceedingly short supply while trying
to report an "out of memory" error; and IIRC there are some other
failure scenarios to be concerned about.

We could maybe accept a design for this that included a sufficiently
well-thought-out set of fallback behaviors. But we haven't seen one
yet.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-09-22 13:55:54 Re: BUG #5661: The character encoding in logfile is confusing.
Previous Message tkbysh2000 2010-09-22 13:30:40 Re: BUG #5661: The character encoding in logfile is confusing.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-22 13:50:39 Re: Configuring synchronous replication
Previous Message tkbysh2000 2010-09-22 13:30:40 Re: BUG #5661: The character encoding in logfile is confusing.