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 1im5gW-0008Gu-Dg for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Dec 2019 00:46: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 1im5gT-0007hM-Lq for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Dec 2019 00:46:53 +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 1im5gT-0007hE-87 for pgsql-hackers@lists.postgresql.org; Tue, 31 Dec 2019 00:46:53 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1im5gM-0007kk-70 for pgsql-hackers@lists.postgresql.org; Tue, 31 Dec 2019 00:46:51 +0000 Received: by mail-wr1-x443.google.com with SMTP id c9so34062470wrw.8 for ; Mon, 30 Dec 2019 16:46:45 -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:references:mime-version :content-disposition:in-reply-to; bh=rSHsbSrbd/9GFAC/y8lwaIEpzC0nLUYk1MbEF8HHC2A=; b=f1DCwIRhJbZjPlLN7kg0TuVPc+p8qpYpPqMsABQ6Ik4r5p2Z1PvyxsEXbGTSVsDuyH e4mIO92apyIjHuhQTIdP5T9CcksPeqvD6vhr6BwGWT3IbNN/eSDB2YaHQkofPWlgaB+W FY3IwU+0TdNpfHF4271BdExQ+JTy43DYL8ERz41dn9xujxYKWlTUicmyVJiojeeUdT5m Arw09nQ8kHZ89CSXwbbbmTXQHKHsMXKIHUvYBAg62JFfXAzJAO8i2E51PFI/82UKz/WD wcUYGCqjRYng5vOSwTfiPlmyeryyq6ctv4wGGkO2x7F4Ky6BF6J80vBw0p2TMGHr0MUT Etlg== 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; bh=rSHsbSrbd/9GFAC/y8lwaIEpzC0nLUYk1MbEF8HHC2A=; b=M9nF70Y49GEvpY6Rnl3knpi/qapafxtL3sbFP+1G/HKhhMaZywHdGKtPOBRNHdHKO2 13dRVXSV9dv5e960TLAlZJdJMhz6jeH4Zn8PaoS8nOp4MAiqPBBvEdCBaDgaD4CgvrqO ZbXU6aQChU9BtX1L8rKhwuGJFI7z4zSEPMa7fl8FAIP0yFE2WhyXDiwviaPef1w+0gjT CxesRHA+ATYnwpZQb7u7153XSQf+2FI922QBDpWn8gTUSbOZdeGSoR6qn9iPenS7Bd2j U9l5AMte1//6Tus5IarwkSamKTtlhYdt8afK48Vl0gWB8vAk3dC/bkL49yc5AI7FsmmV wGzQ== X-Gm-Message-State: APjAAAWUU4guyThcN4tM3IAieLxeDwqkfkHN60gFvcmoPbK9YKBxVl4X nLtKYO/Q4ledhswiEL1pFI2sdQ== X-Google-Smtp-Source: APXvYqzMEu9UscoIYJrjKFlmhGjWBuAzeVhIfLFzi9y9d+lePkcJ4ZqzHepcT+qNwype2UGm8T8amw== X-Received: by 2002:adf:fbc9:: with SMTP id d9mr71648753wrs.20.1577753203944; Mon, 30 Dec 2019 16:46:43 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id a16sm47086447wrt.37.2019.12.30.16.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2019 16:46:43 -0800 (PST) Date: Tue, 31 Dec 2019 01:46:42 +0100 From: Tomas Vondra To: Andrew Dunstan Cc: Tom Lane , Robert Treat , Robert Haas , Nikolay Samokhvalov , Michael Paquier , Bruce Momjian , Alexey Kondratov , v.makarov@postgrespro.ru, PostgreSQL Hackers Subject: Re: [PATCH] Increase the maximum value track_activity_query_size Message-ID: <20191231004642.3rl5ndcj27wq6t3w@development> References: <20191220135704.GC29807@momjian.us> <20191221024757.GF15758@paquier.xyz> <25274.1576963505@sss.pgh.pa.us> <20191230213342.jmtvp2kmqdtt55sp@development> <20733.1577747322@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Dec 31, 2019 at 10:25:26AM +1030, Andrew Dunstan wrote: >On Tue, Dec 31, 2019 at 10:16 AM Andrew Dunstan > wrote: >> >> On Tue, Dec 31, 2019 at 9:38 AM Tom Lane wrote: >> >> > >> > This doesn't seem like a reason not to allow a higher limit, like a >> > megabyte or so, but I'm not sure that pushing it to the moon would be >> > wise. >> > >> >> >> Just to get a mental handle on the size of queries we might be >> allowing before truncation, I did some very rough arithmetic on what >> well known texts might fit in a megabyte. By my calculations you could >> fit about four Animal Farms or one Madame Bovary in about a megabyte. >> So I think that seems like more than enough :-). (My mind kinda >> explores at the thought of debugging a query as long as Animal Farm.) >> > > >Turns out my arithmetic was a bit off. Animal Farm is 90 kb, Madame >Bovary 678 Kb. > Not sure, but the Animal Farm text I found is about ~450kB (~120 pages, with ~3kB per page) ... Anyway, the longest queries I personally saw in production were a couple of kB long (~32kB IIRC, it's been a couple years ago). The queries were generated by the application (not quite a traditional ORM, but something like it), with long identifiers (e.g. table names) pretty long due to including a hash (so being 63 characters most of the time). Plus the columns were always fully qualified, with multiple joins etc. Not sure what a good limit would be. Obviously, if we pick value X, the next day someone will come asking for X+1 ... ;-) regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services