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 1hdxo7-0005TG-S8 for pgsql-general@arkaria.postgresql.org; Thu, 20 Jun 2019 14:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hdxo6-0001IE-IZ for pgsql-general@arkaria.postgresql.org; Thu, 20 Jun 2019 14:12:54 +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 1hdxo5-0001I7-Cp for pgsql-general@lists.postgresql.org; Thu, 20 Jun 2019 14:12:54 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdxo0-0006jO-P7 for pgsql-general@postgresql.org; Thu, 20 Jun 2019 14:12:52 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id EC2C32210D; Thu, 20 Jun 2019 10:12:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 20 Jun 2019 10:12:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=E SV1ilrIIwwiwl1wTLG2lRC0Wi8tERjyWunsvfCI1Qg=; b=L4VQwlhsI1hgqX79O 7/lB1bPspzL0WilOJEJQq8V3sj6rmf4ikr5wiQVPCvoKfxsbGXmR5b59GrDGWCqe BjsZe/Z/PzyXDiHOjvwonHvhU2rtXYx9uR5zNwHTcpH+2ucxFRM/lstDru7DAzZe V2y8WZzAebYGff2Q1hXAqiN2198Mt85ZDq3h7d0Ssw3Tl7qT4cIR1x+XU/HjSbRj LAH77MhYTiIvYP2MAWMVgixdNgadCLUPudBByi+a/c2EfQ6eYIumFmG/gNgzCnrW 5ZzZKY+LI6eIvWVoFq/Cm3kCrhYUCSU5slI3Fax65+vxl9tG3ednjQ+OoYGU9ICK BrEdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=ESV1ilrIIwwiwl1wTLG2lRC0Wi8tERjyWunsvfCI1 Qg=; b=WOVpkvCwu+BHj3GtS0C+22VErGIbZr9nViiUL8lh9HzQJ4DpBI5HNUjPE ijNVzH9PsJIsXJamBWTnNPmJLxDuyha37FtBKeUvJoX5L6z56azUxMpmSFbYDJTN VApP3hTIRFUdNghEJvnFleZ4I97YC+1/bWJQCaASYUfrNliGoSgEI7EAcNwX/0q/ JZ24Wo5yISAteGcWNfmglmTjazc/5AWqDFfCSsqneSfwkY8p9fFAU0A604rby9HA DW4bUEBtBTcnuGTc4Yyf66YPm+yYhZ815ClGeXwKFpyuDber0lgOOKJ6xFL2N3JG g5NEb3Vu0FcNH4hZuLkwPkRGHgpbw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrtdeggdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepjedurddvuddv rdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id B965B80060; Thu, 20 Jun 2019 10:12:45 -0400 (EDT) Subject: Re: Row data is reflected in DETAIL message when constraints fail on insert/update To: Shay Rojansky Cc: William Denton , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <9ad9c755-09f8-e77d-ceb9-fe6f07790ebd@aklaver.com> Date: Thu, 20 Jun 2019 07:12:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/20/19 4:26 AM, Shay Rojansky wrote: > Shay here, maintainer of the Npgsql driver for .NET. > > >> Is there a setting where i can disable the DETAIL field being populated > >> with row data? > > > > See: > > > > > https://www.postgresql.org/docs/11/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT > > > > log_error_verbosity > > While this is helpful, this does not seem to quite fit: > > 1. As this is about personal sensitive data (including conceivably > authentication information), the fact that the default is to log seems > problematic. > 2. The TERSE setting also disables HINT, QUERY and CONTEXT. > 3. There may be other information sent in the DETAIL messages which does > not contain sensitive data. There's no reason to have that disabled > along with the sensitive data. > >  In other words, this isn't about verbosity, but about sensitive data. > It seems like a specific knob for sensitive information may be required, > which would be off by default and would potentially affect other fields > as well (if relevant). As Karsten said that is beyond the scope of the Postgres logging. The prudent thing would be to prevent the log information reaching the application logs. Or put it a log that can only be seen by authorized personnel. -- Adrian Klaver adrian.klaver@aklaver.com