Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A193CF6332B for ; Thu, 19 Jul 2012 09:38:13 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Srpze-0005Zo-A1 for pgsql-bugs@postgresql.org; Thu, 19 Jul 2012 12:38:12 +0000 Received: by pbbrp8 with SMTP id rp8so4322148pbb.19 for ; Thu, 19 Jul 2012 05:37:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=qv2c0kSzz9Lo5G51U1LouC9Cqui3CRUdmjRIYUAms6k=; b=fQ7J5+M1iro3PFJTKu65vkh9PWqJCfysX8VAWWFTtlBifEXZBNRFEdEQC77rtgcObE rV4u8KtAbKEO4I4HhPwLse61mKJj5kcSqzOn8qOolhQJM1fM86USZuDZyYX1ImeKVI5E cH+S9sDne1DZA0OpTS+JQNy4DzW5YzsXen0Dy31F9zmgxnWSEIDzCWpyW9LT5ODYOeRW v1/g5x8y9viveLboe2l1H7XPssHkVgXGJIOPS/fNSOGxdb7WtXqaGsEeOj0UKzbXVq5j o9azwIWvqMtLFsfSVgezZ83m2OCYN1GoNnN4jPKuUZVbDyOJeHXmTRM2wWXBLxsQ6TMA JcfQ== Received: by 10.68.191.41 with SMTP id gv9mr5045113pbc.45.1342701476920; Thu, 19 Jul 2012 05:37:56 -0700 (PDT) Received: from ayaki.localdomain (58-7-231-93.dyn.iinet.net.au. [58.7.231.93]) by mx.google.com with ESMTPS id tq4sm1733113pbc.11.2012.07.19.05.37.53 (version=SSLv3 cipher=OTHER); Thu, 19 Jul 2012 05:37:56 -0700 (PDT) Message-ID: <5007FF9E.7040006@ringerc.id.au> Date: Thu, 19 Jul 2012 20:37:50 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Alban Hertroys CC: Alexander Law , Tatsuo Ishii , pgsql-general@postgresql.org, yi.codeplayer@gmail.com, pgsql-bugs@postgresql.org Subject: Re: [GENERAL] main log encoding problem References: <5007AB3D.3010501@gmail.com> <20120719.162426.57507866406108945.t-ishii@sraoss.co.jp> <5007C399.6000405@gmail.com> <20120719.172805.690055013563911415.t-ishii@sraoss.co.jp> <5007C802.3060007@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkAICStzIlK5Fnz8HToAwzazWqT9R8MxAoGfp41c1x1OtzhjBwV4j9APfEUWGT2nwl+YblB X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/171 X-Sequence-Number: 33647 On 07/19/2012 04:58 PM, Alban Hertroys wrote: > On 19 July 2012 10:40, Alexander Law wrote: >>>> Ok, maybe the time of real universal encoding has not yet come. Then >>>> we maybe just should add a new parameter "log_encoding" (UTF-8 by >>>> default) to postgresql.conf. And to use this encoding consistently >>>> within logging_collector. >>>> If this encoding is not available then fall back to 7-bit ASCII. >>> What do you mean by "not available"? >> Sorry, it was inaccurate phrase. I mean "if the conversion to this encoding >> is not avaliable". For example, when we have database in EUC_JP and >> log_encoding set to Latin1. I think that we can even fall back to UTF-8 as >> we can convert all encodings to it (with some exceptions that you noticed). > I like Craig's idea of adding the client encoding to the log lines. Nonono! Log *file* *names* when one-file-per-database is in use. Encoding as a log line prefix is a terrible idea for all sorts of reasons. -- Craig Ringer