Re: Please define PQ_BUFFER_SIZE in interfaces/libpq/fe-misc.c - Mailing list pgsql-patches

From Tom Lane
Subject Re: Please define PQ_BUFFER_SIZE in interfaces/libpq/fe-misc.c
Date
Msg-id 29209.1115442597@sss.pgh.pa.us
Whole thread Raw
In response to Please define PQ_BUFFER_SIZE in interfaces/libpq/fe-misc.c  (Hideyuki Kawashima <kawasima@ayu.ics.keio.ac.jp>)
Responses Re: Please define PQ_BUFFER_SIZE in
List pgsql-patches
Hideyuki Kawashima <kawasima@ayu.ics.keio.ac.jp> writes:
> While coding, I was surprised that
> magic number 8192 (which is defined as PQ_BUFFER_SIZE in
> backend/libpq/pqcomm.c) are written into the code
> in interfaces/libpq/fe-misc.

AFAICS the uses of 8192 in fe-misc.c have no relationship to
PQ_BUFFER_SIZE or indeed much of anything.  They are just arbitrary
amounts by which to increase the I/O buffer size.

Of course they are not *completely* arbitrary --- they are essentially
guesses about the buffering behavior of the kernel and TCP stack.
But they have nothing to do with the server-side PQ_BUFFER_SIZE.

> The result is attached to this mail.

In future please submit proposed changes as "diff -c" patches.
A complete file is useless because it cannot be applied without
risking overwriting other people's changes.

            regards, tom lane

pgsql-patches by date:

Previous
From: Hideyuki Kawashima
Date:
Subject: Please define PQ_BUFFER_SIZE in interfaces/libpq/fe-misc.c
Next
From: Hideyuki Kawashima
Date:
Subject: Re: Please define PQ_BUFFER_SIZE in