Re: [HACKERS] MAX Query length

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] MAX Query length
Date: 1999-07-14 14:16:43
Message-ID: 25451.931961803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 1999-07-14 14:22:13 Re: [HACKERS] Updated TODO list
Previous Message Tom Lane 1999-07-14 14:11:34 Re: [HACKERS] Interesting behaviour !