Обсуждение: Maximum length of a query

Поиск
Список
Период
Сортировка

Maximum length of a query

От
"Matthew V." <
Дата:
What is the maximum length of a query nowadays? Back in 1998, it was 8192
bytes, but I just executed on via libpq at 16304 bytes.  I have need to
(at least temporarily) support extra-long queries.

Thanks,
--
Matthew Vanecek
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
********************************************************************************
For 93 million miles, there is nothing between the sun and my shadow except me.
I'm always getting in the way of something...

Re: Maximum length of a query

От
Tom Lane
Дата:
"Matthew V." <deusmech@yahoo.com> writes:
> What is the maximum length of a query nowadays? Back in 1998, it was 8192
> bytes,

That was a long time ago ;-).  There has been no hard-wired upper limit
for several releases now.

[ It's rather amusing to watch MySQL's crashme test trying to discover
our maximum query length.  At least on my machine, the Perl process
running crashme hits the kernel's per-process memory limit and dies,
while the backend it's talking to is still comfortably under the limit.
I wonder whether MySQL regards that as a test failure ... ]

            regards, tom lane

Re: Maximum length of a query

От
Jan Wieck
Дата:
Tom Lane wrote:
>
> "Matthew V." <deusmech@yahoo.com> writes:
> > What is the maximum length of a query nowadays? Back in 1998, it was 8192
> > bytes,
>
> That was a long time ago ;-).  There has been no hard-wired upper limit
> for several releases now.
>
> [ It's rather amusing to watch MySQL's crashme test trying to discover
> our maximum query length.  At least on my machine, the Perl process
> running crashme hits the kernel's per-process memory limit and dies,
> while the backend it's talking to is still comfortably under the limit.
> I wonder whether MySQL regards that as a test failure ... ]

Well, it's our fault anyway. You cannot have a hardcoded limit in one
release and then, all of the sudden, out of nowhere go unlimited ... one
can claim that we crash crashme on purpose! OTOH, isn't that what the
name asks for?

I have to apologize at this point ... I did the same with TOAST ...
going unlimited without fair warning. Fortunately crashme never tested
for a maximum content length ;-)


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #