Re: main log encoding problem

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: yi huang <yi(dot)codeplayer(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: main log encoding problem
Date: 2012-05-29 09:03:00
Message-ID: 4FC490C4.1040803@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/23/2012 09:15 AM, yi huang wrote:
> I'm using postgresql 9.1.3 from debian squeeze-backports with
> zh_CN.UTF-8 locale, i find my main log (which is
> "/var/log/postgresql/postgresql-9.1-main.log") contains "???" which
> indicate some sort of charset encoding problem.

It's a known issue, I'm afraid. The PostgreSQL postmaster logs in the
system locale, and the PostgreSQL backends log in whatever encoding
their database is in. They all write to the same log file, producing a
log file full of mixed encoding data that'll choke many text editors.

If you force your editor to re-interpret the file according to the
encoding your database(s) are in, this may help.

In the future it's possible that this may be fixed by logging output to
different files on a per-database basis or by converting the text
encoding of log messages, but no agreement has been reached on the
correct approach and nobody has stepped up to implement it.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Samba 2012-05-29 10:18:47 Disable Streaming Replication without restarting either master or slave
Previous Message Sergey Konoplev 2012-05-29 06:38:00 Re: Export and import from one postgres server to another