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 1huMeI-000241-Ru for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Aug 2019 19:58:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1huMeG-00058L-Bh for pgsql-hackers@arkaria.postgresql.org; Sun, 04 Aug 2019 19:58:32 +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 1huMeG-00058E-3M for pgsql-hackers@lists.postgresql.org; Sun, 04 Aug 2019 19:58:32 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huMeD-0004hF-6l for pgsql-hackers@lists.postgresql.org; Sun, 04 Aug 2019 19:58:31 +0000 Received: by mail-wr1-x444.google.com with SMTP id r1so82246659wrl.7 for ; Sun, 04 Aug 2019 12:58:29 -0700 (PDT) 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uMG8ljlGZIQzyda+R0YoV9EKUvQuWiE1TLdrGMcGtsM=; b=SDJpXBzmb0eOx3aQarEamREvmgCFTJ5nqBP9AK+M0STRtUP9jAA9YsXhu3V1k60nAZ XRDR7+sGbJfDl6Wi4Uz0qjJY+AlI48wUEkk/fodqkZpPpiSDXK6nQZWUIEcGMExcnUMy 3lNf+L1NLAHmZcnk7vHPCE0nznxYVwtI8/LnMX/iboML4wQtnKRWzHYAANM51ps18gvy PgNw3NmPWEYVr7gPkZjC9O4ZMYo8r04q5Uzvfb06VxYiqg2OGPJmbLQ7EoLef331wOr/ 5D0MWlbl8SOZDpv5MBGElJyKqQyMwoc5TfHx1c1gN+wJKV9Tli4N3Efryg4UzOB/xmPd h1NQ== 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=uMG8ljlGZIQzyda+R0YoV9EKUvQuWiE1TLdrGMcGtsM=; b=MA7lmZHGuljJXDUArM9iVSVFp1krEhE6ORdxvrlgLX/J+mO1rMmlbYG2tTJ9E7BKpZ orIJMnw8PEt7HDAjCz80ky+aUqOB4UzLjrFXZvpbNKETy1ax+PXfUYjBkwhliX2VQCVx rgNpKlOif5woRrWdcpa4r8a0PfPZ0EDWYbezoYB3YBZWPE90u/jgOQjQdoUzCOpldm8m 8y5Ohjg7dn9nIiqzmUamIgXUtnljI3KLi3z3ZQqPNEC7Ck/M6PcbHNRFe/AjDjhjVePS BGOGujDY2KqXOswqLsic0EcZW9+vk5HIrF7h/CcYUVlQzvAnHVbYgeDPQNrLyURs61om vEVg== X-Gm-Message-State: APjAAAUuk+GxbJUsTOZIA7iadavLrUTmFu3TB4TO9PiO5Nmybw3xE8KX elRxr6iP+W47PG8gmjC4q9Q/vQ== X-Google-Smtp-Source: APXvYqxcBFonv9i3HJkfSYTmiAkd8JeiLJVgBFInv2+uDFmS2x2O53xkAerPL7xtRbg/UhryPMqjYw== X-Received: by 2002:adf:fc0c:: with SMTP id i12mr31287940wrr.86.1564948705952; Sun, 04 Aug 2019 12:58:25 -0700 (PDT) Received: from localhost (ip-86-49-253-160.net.upcbroadband.cz. [86.49.253.160]) by smtp.gmail.com with ESMTPSA id o11sm77517017wmh.37.2019.08.04.12.58.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 12:58:25 -0700 (PDT) Date: Sun, 4 Aug 2019 21:58:23 +0200 From: Tomas Vondra To: Tom Lane Cc: Adrien Nayrat , pgsql-hackers@lists.postgresql.org Subject: Re: idea: log_statement_sample_rate - bottom limit for sampling Message-ID: <20190804195823.qi7vntgybfgitdnn@development> References: <156292912396.1365.3073279552263868317.pgcf@coridan.postgresql.org> <156292957348.1365.8079060287740507529.pgcf@coridan.postgresql.org> <20190727221948.irg6sfqh57dynoc7@development> <4540bafe-1b23-a6ce-a313-f3b03bb418df@anayrat.info> <20190801100445.yo5v3pdxelijztzm@development> <3f6b75ea-03bb-7c35-1f20-e989f4b7f9ac@anayrat.info> <20190804191037.em6rmlvxjpcsjtqu@development> <25079.1564946172@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <25079.1564946172@sss.pgh.pa.us> User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Aug 04, 2019 at 03:16:12PM -0400, Tom Lane wrote: >Tomas Vondra writes: >> OK, I have the revert ready. The one thing I'm wondering about is >> whether we need to revert log_transaction_sample_rate too? I think it's >> pretty much independent feature, so I think we can keep that. Opinions? > >Isn't the issue here the interaction between log_transaction_sample_rate >and log_min_duration_statement? Seems like we have that question >regardless of whether log_statement_sample_limit exists. > No, that interaction only affects statement-level sampling. For transaction-level sampling we do the sampling independently of the statement duration, i.e. we when starting a transaction we determine whether the whole transaction will be sampled. It has nothing to do with the proposed log_statement_sample_limit. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services