"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