Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C0D80B5DC13 for ; Fri, 16 Sep 2011 21:34:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 13680-03 for ; Sat, 17 Sep 2011 00:34:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 3D832B5DBDA for ; Fri, 16 Sep 2011 21:34:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8H0YS7W016425; Fri, 16 Sep 2011 20:34:28 -0400 (EDT) To: Craig Ringer cc: Carlo Curatolo , pgsql-bugs@postgresql.org Subject: Re: BUG #5800: "corrupted" error messages (encoding problem ?) In-reply-to: <4E73E757.8050006@ringerc.id.au> References: <201012211547.oBLFl3qC019008@wwwmaster.postgresql.org> <1303986662099-4346180.post@n5.nabble.com> <1316207412940-4812062.post@n5.nabble.com> <4E73E757.8050006@ringerc.id.au> Comments: In-reply-to Craig Ringer message dated "Sat, 17 Sep 2011 08:18:31 +0800" Date: Fri, 16 Sep 2011 20:34:28 -0400 Message-ID: <16424.1316219668@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/107 X-Sequence-Number: 31124 Craig Ringer writes: > On 09/17/2011 05:10 AM, Carlo Curatolo wrote: >> Just tried with PG 9.1...same problem... > Yep. There appears to be no interest in fixing this bug. All the > alternatives I proposed were rejected, and there doesn't seem to be any > concern about the issue. The problem is to find a cure that's not worse than the disease. I'm not exactly convinced that forcing all log messages into a common encoding is a better behavior than allowing backends to log in their native database encoding. If you do want a common encoding, there's a very easy way to get it, ie, standardize on one encoding for all your databases. People who aren't doing that already probably have good reasons why they want to stay with the encoding choices they've made; forcing their logs into some other encoding isn't necessarily going to improve their lives. > ... The only valid fixes are to log them to different files (with some > way to identify which encoding is used) I don't recall having heard any serious discussion of such a design, but perhaps doing that would satisfy some use-cases. One idea that comes to mind is to provide a %-escape for log_filename that expands to the name of the database encoding (or more likely, some suitable abbrevation). The logging collector protocol would have to be expanded to include that information, but that seems do-able. regards, tom lane