Re: [HACKERS] MAX Query length - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] MAX Query length
Date
Msg-id 25451.931961803@sss.pgh.pa.us
Whole thread Raw
In response to MAX Query length  ("Ansley, Michael" <Michael.Ansley@intec.co.za>)
List pgsql-hackers
"Ansley, Michael" <Michael.Ansley@intec.co.za> writes:
> Trawling through the code last night I noticed that:
> #define MAX_QUERY_SIZE (BLCKSZ * 2)

> Is there any conceivable reason why the query length would be dependent on
> the block size?

Sure: you want to be able to INSERT a tuple of maximum size.  In the
absence of dynamically sized text buffers, a reasonable estimate of
the longest INSERT command of interest is going to depend on BLCKSZ.

I don't know how long that particular constant has been defined like
that, though.  I had the idea that it was the same as BLCKSZ, not 2x.
You may well find that frontend libpq is using a different value for
its buffer sizes than the backend is :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Interesting behaviour !
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Updated TODO list