Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YbrOB-0001gH-Rf for pgsql-admin@arkaria.postgresql.org; Sat, 28 Mar 2015 14:07:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YbrOA-0003oI-Rf for pgsql-admin@arkaria.postgresql.org; Sat, 28 Mar 2015 14:07:02 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YbrO8-0003o9-Iz for pgsql-admin@postgresql.org; Sat, 28 Mar 2015 14:07:00 +0000 Received: from mail-yh0-x230.google.com ([2607:f8b0:4002:c01::230]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YbrO5-0004DS-GI for pgsql-admin@postgresql.org; Sat, 28 Mar 2015 14:06:58 +0000 Received: by yhim52 with SMTP id m52so46617723yhi.2 for ; Sat, 28 Mar 2015 07:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=SXiOrA1RC+keOp/NNR8cnWPOXRDbA9AQ1gV5SOjjK6E=; b=uiAwsu6xLG/sHgutkXrumkiOiDWqomgQ+r9574LGspH9Ixh8FRFrNmZGP3dXA1AF3k zCsbGzGAHnu//hnJ2HLdlm7OOThER0tHYrOq6Pep2i7lJ8A6uPnyzoYN8NIW9eTXOYY0 MlWzXCbYCbt7z2Scj03ACvjd6LlUiM/PVYGymHbE4tqoIY5e9aJLda4rG+DseXMvJypZ Vz9idBnkQPoJoisMdu2O39OAYsddkUiIN+4MLut6M7GGvzoAT/9uiyxQv3E0+InNchqx kLS87+1BkbdMfzGvW7SF1qNgWnIOJ7MUvecGQnjPQI9oPtsbT+GIJgmzSSZcaMIUGDrz I0UA== X-Received: by 10.236.1.200 with SMTP id 48mr25203966yhd.64.1427551616699; Sat, 28 Mar 2015 07:06:56 -0700 (PDT) Received: from [192.168.254.2] (h77.89.102.166.static.ip.windstream.net. [166.102.89.77]) by mx.google.com with ESMTPSA id b54sm5395998yha.9.2015.03.28.07.06.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2015 07:06:56 -0700 (PDT) Message-ID: <5516B577.9070509@gmail.com> Date: Sat, 28 Mar 2015 10:06:47 -0400 From: John Scalia User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: naveen kumar , "pgsql-admin@postgresql.org" Subject: Re: postgres log_destination question References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------030501000504050106030902" X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------030501000504050106030902 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 3/27/2015 8:33 PM, naveen kumar wrote: > Hello All, > > I have configured postgresql on 2 machines. on both machines I have setup log_destination = 'syslog' and log_directory='pg_log'. if check logs on both machines, on one machine > logs are moved to /var/log/pg_log and another one logs are moved to syslog only. > and log_line_prefix is set to 'host=%r,user=%u,db=%d' but still some sqls are logging with out prifix. > > Can any one help me on this please.. > > Thanks & Regards, > M Naveen Kuamr, > PostgreSQL Database Administrator, > Mobile Number: +91 7755929449. One thing that sticks out to me is "host=%r" should probably be "host=%h". not that I've checked what the %r stands for. What I'd do for the main problem, however, is check which directory on each host is $PGDATA, as it sounds like one of your systems is looking for everything somewhere else and it could be reading a different postgresql.conf file. --------------030501000504050106030902 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

On 3/27/2015 8:33 PM, naveen kumar wrote:
Hello All,

I have configured postgresql on 2 machines. on both machines I have setup log_destination = 'syslog' and log_directory='pg_log'. if check logs on both machines, on one machine logs are moved to /var/log/pg_log and another one logs are moved to syslog only.
and log_line_prefix is set to 'host=%r,user=%u,db=%d' but still some sqls are logging with out prifix.

Can any one help me on this please..

Thanks & Regards,
M Naveen Kuamr,
PostgreSQL Database Administrator, 
Mobile Number: +91 7755929449. 
One thing that sticks out to me is "host=%r" should probably be "host=%h". not that I've checked what the %r stands for. What I'd do for the main problem, however, is check which directory on each host is $PGDATA, as it sounds like one of your systems is looking for everything somewhere else and it could be reading a different postgresql.conf file.
--------------030501000504050106030902--