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 1h6bGt-0003k1-Gs for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2019 13:28:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6bGs-0005xG-7L for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2019 13:28:42 +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 1h6bGr-0005x9-St for pgsql-hackers@lists.postgresql.org; Wed, 20 Mar 2019 13:28:42 +0000 Received: from mail-it1-x143.google.com ([2607:f8b0:4864:20::143]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6bGo-0008Pv-3u for pgsql-hackers@postgresql.org; Wed, 20 Mar 2019 13:28:41 +0000 Received: by mail-it1-x143.google.com with SMTP id z126so28629322itd.5 for ; Wed, 20 Mar 2019 06:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sSCQfR4ERVc/AzbxywS1NZ2Dhz6fjJjJbL37aJC85Kw=; b=zxKzO59DsNZ2kcpqfWWO3MxgLBm+mulwvkBREyVlr52AFzngHsAEvObmCBYJa0Iudb LVt4tEm7WbqsN52/oh6zH4hOCnuOt2KracxPI0rqhKxzO61wO7s+363Duh4BdT7FS+CL rwwggb6E8NkL7GxTsoJaF3rrFWD4BkvnQd1NKcVy+jPakEjUZeXgjjWDfSf6ASoK3j/P FFWwKmNslHM8xKV/kPi8+o2VLU4lnnvm6H8c9injPBK1j+0AZ6Bi7doQTvWHxU6DfL+r U69O2C4Yx3fIq7RcOsa+XWT/m1QtYi/M83O8MqPl9nfHvk+w3tqd64ZeBkjKwpQZOAPr jVTA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sSCQfR4ERVc/AzbxywS1NZ2Dhz6fjJjJbL37aJC85Kw=; b=Wz39MlSOPGIwd4zTO18l7iyunxDtA5O5l0m/ADLuACQtPdwmKQGnHdnrQAtlpX6hyx PUnKog9EuU4o1xb3K+GAErsrwonVnr9O9Ei7Jj8Qf5ScJfRT4AJMwnCUKoNoVSjiVhJt m9HFRUrNlAz1VZaii5zH1gLe3c8E+LoAAO2plHvrxyLSCw0wz3SdAEVQuaiiKvcNo+Rr xyZfywKNaj5iql+t8pA7e7wqsBvFUBc9zVzpcwmeuOUlbEEfRc3dtfY5eF+x1tcI8QZA IcyL3V//pNtSftqlj3Gqd2KKYImOJWVLaSGkkw6EPi3RhoiPj/b9QM8mzIQsaQKI+18a hdRw== X-Gm-Message-State: APjAAAUTSp7hmo62RYtSBYtDWhDEm7od326iUWmM6daNYdcSCkwXyEcM bWycbf0B+Tc03MSE2BSLHPtzeNgH0q4= X-Google-Smtp-Source: APXvYqx6VyTLltqeUEwM2Cf7WrXQJbyaeWkFF1wiS0s4YCuVgeWupF9L/qq/YEXpsbkWUzfVVgv9Mw== X-Received: by 2002:a24:d4c1:: with SMTP id x184mr4577653itg.174.1553088516317; Wed, 20 Mar 2019 06:28:36 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k18sm884080iob.60.2019.03.20.06.28.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 06:28:35 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 24554800B8B; Wed, 20 Mar 2019 08:28:34 -0500 (CDT) Date: Wed, 20 Mar 2019 08:28:34 -0500 From: Justin Pryzby To: David Steele Cc: Arthur Zakirov , pgsql-hackers@postgresql.org Subject: Re: Re: query logging of prepared statements Message-ID: <20190320132833.GB2952@telsasoft.com> References: <20190208132953.GF29720@telsasoft.com> <20190215145704.GW30291@telsasoft.com> <20190227180653.GF28750@telsasoft.com> <70868e0d-2a29-36c8-e3e2-f54a56804bc4@postgrespro.ru> <20190304183150.GK29584@telsasoft.com> <345f3504-e3cd-3a01-c593-ebbbe555dd69@postgrespro.ru> <2da70a91-2a22-9d78-84ba-cba4b71c7541@pgmasters.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2da70a91-2a22-9d78-84ba-cba4b71c7541@pgmasters.net> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On Wed, Mar 20, 2019 at 02:46:00PM +0400, David Steele wrote: > >I perfectly understand your use case. I agree, it is duplicated. But I > >think some people may want to see it at every EXECUTE, if they don't want > >to grep for the prepared statement body which was logged earlier. > > > >I think it would be good to give possibility to configure this behavior. > >At first version of your patch you relied on log_error_verbosity GUC. I'm > >not sure that this variables is suitable for configuring visibility of > >prepared statement body in logs, because it sets more general behavior. > >Maybe it would be better to introduce some new GUC variable if the > >community don't mind. > > Thoughts on this? I'm happy to make the behavior configurable, but I'm having trouble believing many people would want a GUC added for this. But I'd be interested to hear input on whether it should be configurable, or whether the original "verbose" logging is desirable to anyone. This is mostly tangential, but since writing the original patch, I considered the possibility of a logging GUC which is scales better than log_* booleans: https://www.postgresql.org/message-id/20190316122422.GR6030%40telsasoft.com If that idea were desirable, there could be a logging_bit to enable verbose logging of prepared statements. Justin