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 1iePHo-0007vm-CR for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2019 20:05:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iePHn-00012b-3j for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2019 20:05:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iePHm-00012T-NC for pgsql-hackers@lists.postgresql.org; Mon, 09 Dec 2019 20:05:38 +0000 Received: from mail-vs1-xe44.google.com ([2607:f8b0:4864:20::e44]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iePHk-0000iT-9V for pgsql-hackers@postgresql.org; Mon, 09 Dec 2019 20:05:37 +0000 Received: by mail-vs1-xe44.google.com with SMTP id g15so11315257vsf.1 for ; Mon, 09 Dec 2019 12:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=K9d6oj4bwJKbry2Ab26HxiirZ+yMpCF/m8aFtBEy598=; b=bffQj9ZbXSTVn+RUigqVrsp6flkGo4lS7jmNX/mesqATUKmdQFs5LQj+/leiBemo8+ 7qKeNJGV0kPUcBz2phCld4oqCQeeQRZ+B6+Eyx0DceL+1HRV1h6vVPdOomwnzojd+tf7 01TvQfsABoiXP2ON9Y/7eJS5vLcK/bJD+YdUV1YgAVy/IbCte6wtm2U73IVE0NxnPR42 94SHjXvVW/NiokSmLcVq0XXhlpZZFKMMpzb1isXyvygAuknjhOuu9rORHI77qOFgHhJX 6GOh6jKd8F9GuRudOA92W4FIrKdkbXrQE2GOYa1++Vwq0a8TlLcnsQUiAlZWYo8HDqGs gw4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=K9d6oj4bwJKbry2Ab26HxiirZ+yMpCF/m8aFtBEy598=; b=DrSYUFUFIxzg5ZjaFUdzGPXM7chzB5oShqR8juyDtvA/WCXKBXyaC61xzMebdkNuEF LO75WASJjmDTnGZXhz+VM3Zl5Q7lw1wxRhJ2LT7c3RRzU2HiURKez1IGIR92gbH1xszM LQ2txRUe/zLXRWA+ttmA/vYBIn2ih942N4ZgD+S8V2ZXj0rKr+ISTam7iWq/wLOPD7RS KOpT6grzpAsfDHlp/shPOMlLxMtVufw7jYFb2A8jA2CjggIo2tiHxE2sVrxd7iHk4Jff vAANA3JSFtIfFBd6wa/hJmzHHyWip0Ulz+9BLnehXHEIQMsqJse4xAimGqt16F3jA/jL /r2g== X-Gm-Message-State: APjAAAWN/fBDkKpWx26+IMsXhLf43dgyeYGmIGB3MkNDfo/4QvG5Tti2 DJKIdRCld8XfNPSHEzr4V1FrQQ== X-Google-Smtp-Source: APXvYqwnLShbZ5i9z6xEM6Fh+qH4LX2OSWzJjH+a58LBdZnWswSfvGLCS6yYT4xZW0rBR7svOHW6mg== X-Received: by 2002:a67:d396:: with SMTP id b22mr22911848vsj.195.1575921934907; Mon, 09 Dec 2019 12:05:34 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.217.182.133]) by smtp.gmail.com with ESMTPSA id w3sm517373uad.17.2019.12.09.12.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 12:05:34 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 9574F3008CC; Mon, 9 Dec 2019 17:05:31 -0300 (-03) Date: Mon, 9 Dec 2019 17:05:31 -0300 From: Alvaro Herrera To: Tom Lane Cc: Andres Freund , Alexey Bashtanov , Peter Eisentraut , PostgreSQL Hackers Subject: Re: log bind parameter values on error Message-ID: <20191209200531.GA19848@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191209194908.GA17784@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Also: * Thoughts from Andres, who was busily messing about with stringinfo.c on his patch series for programmatic out/read node functions? * Thoughts on changing the current usage of the ...Quoted() function in postgres.c and pl_exec.c so that they print N characters (64) instead of the current default of printing everything? I'm up for changing, but have got no +1s on that. I think bloating log files with enormous parameters is pointless. * v18 and v19 now alwys do a "strlen(s)", i.e. they scan the whole input string -- pointless when maxlen is given. We could avoid that for very large input strings by doing strnlen(maxlen + MAX_MULTIBYTE_CHAR_LEN) so that we capture our input string plus one additional multibyte char. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services