Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1er6IB-0008IL-WC for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 18:17:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1er6IA-0005xd-Tk for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 18:17:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1er6IA-0005xT-MJ for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 18:17:26 +0000 Received: from bantum.comp.uvic.ca ([142.104.177.238]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1er6I6-0006mX-Ej for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 18:17:26 +0000 Received: from [192.168.1.4] (S01060018f8676393.gv.shawcable.net [184.66.128.136]) (authenticated bits=0) by bantum.comp.uvic.ca (8.14.4/8.14.4) with ESMTP id w1SIHFB8038462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 28 Feb 2018 10:17:15 -0800 Subject: Re: Separate log for a specfic database To: pgsql-admin@lists.postgresql.org References: <00e501d3b0ba$7d302830$77907890$@1nar.com.tr> From: Evan Rempel Message-ID: <04ec6db0-2983-1366-ccd6-84e9bbdb21c3@uvic.ca> Date: Wed, 28 Feb 2018 10:17:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-MW X-UVic-Virus-Scanned: OK - Passed virus scan by ClamAV (clamd) on bantum X-UVic-Virus-Scanned: OK - Passed virus scan by Sophos (sophie) on bantum X-UVic-Scan: bantum.comp.uvic.ca filter_version 3.7.9 X-UVic-Outbound-Scan: bantum.comp.uvic.ca Not_scanned_Remote X-UVic-Spam-Scan: bantum.comp.uvic.ca No_recips_rejected X-UVic-Spam-Status: No X-UVic-Spam-Score: 0.249 HELO_MISC_IP X-UVic-Spam-Level: Spam-Level X-Scanned-By: MIMEDefang 2.78 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 02/28/2018 10:05 AM, David G. Johnston wrote: > On Wednesday, February 28, 2018, Ertan Küçükoğlu > > wrote: > > Hello, > > I am using PostgreSQL 9.6.6 on Debian 9 Stretch system. Installed > using > apt-get. > I wonder if I can have two log files. One for complete database > server and > another for one specific database in the server. > I have already read below link, but cannot understand if that is > possible, > or how. > https://www.postgresql.org/docs/9.6/static/runtime-config-logging.html > > > > When it says: > > " This parameter can only be set in the postgresql.conf file or on the > server command line. " > > It is scoped to the cluster and all databases therein.  To do what you > desire you would need to put the unique database into its own cluster. > > David J. That is not exactly true. Logging could be set up to use syslog and if the database name is in the log lines then some filtering and routing of hose messages could go into their own files. This would require a mature syslog environment but it is possible. Evan.