Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSt9s-00010j-Nn for pgsql-general@arkaria.postgresql.org; Fri, 08 Nov 2019 01:33:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSt9r-0004al-Gh for pgsql-general@arkaria.postgresql.org; Fri, 08 Nov 2019 01:33:51 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSt9r-0004ae-70 for pgsql-general@lists.postgresql.org; Fri, 08 Nov 2019 01:33:51 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSt9o-0006lu-I2 for pgsql-general@postgresql.org; Fri, 08 Nov 2019 01:33:50 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1iSt9l-0001ZB-7F; Thu, 07 Nov 2019 20:33:45 -0500 Date: Thu, 7 Nov 2019 20:33:45 -0500 From: Bruce Momjian To: =?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= Cc: "pgsql-general@postgresql.org" Subject: Re: logging proxy Message-ID: <20191108013345.GA3553@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Nov 1, 2019 at 01:58:10AM +0300, Олег Самойлов wrote: > Does anyone know PostgresQL proxy which can log queries with username, > ip and affected rows for security reason. PostgresQL itself can log > almost all, except affected rows. You can use the server logs to get the non-row information, then use streaming replication with logical decoding to get the rows for each transaction started by the user. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +