Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCJWk-0005Yp-EI for pgsql-admin@arkaria.postgresql.org; Tue, 25 Jan 2022 10:58:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCJWj-0005WL-52 for pgsql-admin@arkaria.postgresql.org; Tue, 25 Jan 2022 10:58:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCJWi-0005W2-OI for pgsql-admin@lists.postgresql.org; Tue, 25 Jan 2022 10:58:16 +0000 Received: from mail.pscs.co.uk ([178.159.9.185]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCJWf-0002oB-Uy for pgsql-admin@lists.postgresql.org; Tue, 25 Jan 2022 10:58:16 +0000 Authentication-Results: mail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=pscs Received: from lmail.pscs.co.uk ([192.168.150.1]) by mail.pscs.co.uk ([192.168.150.185] running VPOP3) with ESMTPSA (TLSv1.3 TLS_AES_256_GCM_SHA384) for ; Tue, 25 Jan 2022 10:58:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pscs.co.uk; q=dns/txt; s=lmail; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:References:From :In-Reply-To:Cc:Content-Transfer-Encoding:Reply-to:Sender; t=1643108272; x=1643713072; bh=7eypzvq5LifuEmlM7DvoMgIhcsUWYt9YwbxBKT71Jvk=; b=JaYoOFxmEpNMhFDWj8hP0Uf95PevyH1Sbbw0HDT/A7qG3isdGdiNun/Vkp/9MdTPSwpZCfTw jAIFYEw6ATQOemQliJ6o7ooQtHHpQrR7mvYnk/M8uvZ7Rt1210mKu0dcTNX+z03OzYGtA6Mshc N0AkAbOCFRpbGeRHwxYhZ/5wc= Authentication-Results: lmail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=paul Received: from [192.168.57.138] ([82.68.48.206] (82-68-48-206.dsl.in-addr.zen.co.uk)) by lmail.pscs.co.uk ([192.168.150.70] running VPOP3) with ESMTPSA (TLSv1.3 TLS_AES_256_GCM_SHA384); Tue, 25 Jan 2022 10:57:52 -0000 Content-Type: multipart/alternative; boundary="------------e7b5x6SCEVytDH3PO8QvSzHA" Message-ID: <066fa9a8-9e51-dd4d-83e6-4efcc8e36f53@pscs.co.uk> Date: Tue, 25 Jan 2022 10:57:48 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Separate log_destination, user specific To: pgsql-admin@lists.postgresql.org References: From: Paul Smith In-Reply-To: X-Authenticated-Sender: paul X-Server: VPOP3 Enterprise V8.3 - Registered to: PSCS X-Organisation: Paul Smith Computer Services X-VPOP3Tester: 12 345 X-Authenticated-Sender: pscs List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------e7b5x6SCEVytDH3PO8QvSzHA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 25/01/2022 10:48, Daulat wrote: > Is it possible to set a separate log_destination for some users  in > Postgres? > As I know all actions are recorded under the directory specified > by log_destination. > > But I want to create a separate log file for DBA users to log their > actions. > Is any third party or free ware tool available to accomplish this task ? Could you set PostgreSQL to log to Syslog, and then set up filters in rsyslog? (I've not done it, but it sounds like it may work) -- Paul Paul Smith Computer Services support@pscs.co.uk - 01484 855800 -- Paul Smith Computer Services Tel: 01484 855800 Vat No: GB 685 6987 53 Sign up for news & updates at http://www.pscs.co.uk/go/subscribe --------------e7b5x6SCEVytDH3PO8QvSzHA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 25/01/2022 10:48, Daulat wrote:
Is it possible to set a separate log_destination for some users  in Postgres? 
As I know all actions are recorded under the directory specified by log_destination. 

But I want to create a separate log file for DBA users to log their actions.
Is any third party or free ware tool available to accomplish this task ?


Could you set PostgreSQL to log to Syslog, and then set up filters in rsyslog?
(I've not done it, but it sounds like it may work)


-- 
Paul
Paul Smith Computer Services
support@pscs.co.uk - 01484 855800

--

Paul Smith Computer Services
Tel: 01484 855800
Vat No: GB 685 6987 53

--------------e7b5x6SCEVytDH3PO8QvSzHA--