Re: [HACKERS] Kerberos 5 breakage.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Kerberos 5 breakage.
Date: 1998-05-20 21:15:11
Message-ID: 20433.895698911@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Matthew N. Dodd" <winter(at)jurai(dot)net> writes:
> Also, allowing writes of single characters is bad; you incur a context
> switch each write. The client and server should be writing things into
> largish buffers and writing those instead of doing small writes.

> The existence of the following scare me...
> pqPutShort(int integer, FILE *f)
> pqPutLong(int integer, FILE *f)
> [etc]

Look again. Those functions use <stdio.h>, which provides buffering.
They don't need to do it themselves.

It might be good to put a layer underneath these functions to allow
insertion of encryption or something like that, but efficiency is not
a valid argument for doing it.

On the client side, in the recent libpq rewrite I took out usage of
stdio and did my own buffering instead, but that was just so that
I could control when and how the client would block for input.
I don't think it bought any speedup.

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Henry B. Hotz 1998-05-20 21:15:57 Re: [HACKERS] Kerberos 5 breakage.
Previous Message Hamish.N.MARSON 1998-05-20 20:52:06 Bug in postgresql-6.3.2