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 1ihxvR-00065f-1y for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Dec 2019 15:41:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihxvO-0004Tt-Sc for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Dec 2019 15:41:14 +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 1ihxvO-0004Tm-G6 for pgsql-hackers@lists.postgresql.org; Thu, 19 Dec 2019 15:41:14 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ihxvM-0004D3-0a for pgsql-hackers@lists.postgresql.org; Thu, 19 Dec 2019 15:41:13 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1ihxvK-0002Ec-3Z; Thu, 19 Dec 2019 10:41:10 -0500 Date: Thu, 19 Dec 2019 10:41:10 -0500 From: Bruce Momjian To: v.makarov@postgrespro.ru Cc: pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Increase the maximum value track_activity_query_size Message-ID: <20191219154110.GL30116@momjian.us> References: <7b5ecc5a9991045e2f13c84e3047541d@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b5ecc5a9991045e2f13c84e3047541d@postgrespro.ru> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Good question. I am in favor of allowing a larger value if no one objects. I don't think adding the min/max is helpful. --------------------------------------------------------------------------- On Tue, Nov 26, 2019 at 05:59:25PM +0300, v.makarov@postgrespro.ru wrote: > Hi Hackers, > > Some ORMs may generate queries larger than the maximum possible value of > track_activity_query_size (100 kB). > Is there any reasons to limit the maximum value of track_activity_query_size > to such small value? > Increasing the maximum value to 1 MB will help partially solve this problem. > Also in the file postgresql.conf.sample pointed maximum value > track_activity_query_size (before that it was not specified). > > -- > Vyacheslav Makarov > Postgres Professional: http://www.postgrespro.com > The Russian Postgres Company > diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c > index ba4edde71a..0e64dc1dbb 100644 > --- a/src/backend/utils/misc/guc.c > +++ b/src/backend/utils/misc/guc.c > @@ -3200,7 +3200,7 @@ static struct config_int ConfigureNamesInt[] = > GUC_UNIT_BYTE > }, > &pgstat_track_activity_query_size, > - 1024, 100, 102400, > + 1024, 100, 1048576, > NULL, NULL, NULL > }, > > diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample > index 46a06ffacd..55d3bfbfd0 100644 > --- a/src/backend/utils/misc/postgresql.conf.sample > +++ b/src/backend/utils/misc/postgresql.conf.sample > @@ -569,7 +569,7 @@ > #track_counts = on > #track_io_timing = off > #track_functions = none # none, pl, all > -#track_activity_query_size = 1024 # (change requires restart) > +#track_activity_query_size = 1024 # range 100B - 1MB (change requires restart) > #stats_temp_directory = 'pg_stat_tmp' > > -- 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 +