From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Treat <rob@xzilla.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Nikolay Samokhvalov <samokhvalov@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Alexey Kondratov <a.kondratov@postgrespro.ru>
Cc: v.makarov@postgrespro.ru
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: [PATCH] Increase the maximum value track_activity_query_size
Date: Tue, 31 Dec 2019 01:46:42 +0100
Message-ID: <20191231004642.3rl5ndcj27wq6t3w@development> (raw)
In-Reply-To: <CAA8=A7-u0J9za-du2YwPwOObHq24Dv=WLr4MesiKQShRchp6NQ@mail.gmail.com>
References: <20191220135704.GC29807@momjian.us>
<20191221024757.GF15758@paquier.xyz>
<CANNMO+LrCCMTJBgETVyWdRGmwkT8hO9utF1RtdpsO=w765z6PQ@mail.gmail.com>
<25274.1576963505@sss.pgh.pa.us>
<CA+TgmoZSs4BZ+CQ6x0Vswxhc8A6r78iCNLcJKWLazGWCqKHnYw@mail.gmail.com>
<CABV9wwOXrWH2qdPvjzjUTMB1WKF=3NuUguLXnwEkQmZHt5AyiA@mail.gmail.com>
<20191230213342.jmtvp2kmqdtt55sp@development>
<20733.1577747322@sss.pgh.pa.us>
<CAA8=A7-N=eBL_f3SvSKSg317V_4Es8miQxO-1R7bfe6+y4FAuQ@mail.gmail.com>
<CAA8=A7-u0J9za-du2YwPwOObHq24Dv=WLr4MesiKQShRchp6NQ@mail.gmail.com>
On Tue, Dec 31, 2019 at 10:25:26AM +1030, Andrew Dunstan wrote:
>On Tue, Dec 31, 2019 at 10:16 AM Andrew Dunstan
><andrew.dunstan@2ndquadrant.com> wrote:
>>
>> On Tue, Dec 31, 2019 at 9:38 AM Tom Lane <tgl@sss.pgh.pa.us> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, andrew.dunstan@2ndquadrant.com, tgl@sss.pgh.pa.us, rob@xzilla.net, robertmhaas@gmail.com, samokhvalov@gmail.com, michael@paquier.xyz, bruce@momjian.us, a.kondratov@postgrespro.ru, v.makarov@postgrespro.ru
Subject: Re: [PATCH] Increase the maximum value track_activity_query_size
In-Reply-To: <20191231004642.3rl5ndcj27wq6t3w@development>
References: <20191220135704.GC29807@momjian.us> <20191221024757.GF15758@paquier.xyz> <CANNMO+LrCCMTJBgETVyWdRGmwkT8hO9utF1RtdpsO=w765z6PQ@mail.gmail.com> <25274.1576963505@sss.pgh.pa.us> <CA+TgmoZSs4BZ+CQ6x0Vswxhc8A6r78iCNLcJKWLazGWCqKHnYw@mail.gmail.com> <CABV9wwOXrWH2qdPvjzjUTMB1WKF=3NuUguLXnwEkQmZHt5AyiA@mail.gmail.com> <20191230213342.jmtvp2kmqdtt55sp@development> <20733.1577747322@sss.pgh.pa.us> <CAA8=A7-N=eBL_f3SvSKSg317V_4Es8miQxO-1R7bfe6+y4FAuQ@mail.gmail.com> <CAA8=A7-u0J9za-du2YwPwOObHq24Dv=WLr4MesiKQShRchp6NQ@mail.gmail.com> <20191231004642.3rl5ndcj27wq6t3w@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox