Re: cypg.dll, libpq_a, initdb max_connections 60

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: cypg.dll, libpq_a, initdb max_connections 60
Date: 2004-10-09 15:18:28
Message-ID: 27806.1097335108@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Reini Urban <rurban(at)x-ray(dot)at> writes:
> With this patch we might want to rename libpq.a to libpq.dll.a in our
> install step later.

Isn't ".dll.a" a contradiction in terms? This doesn't seem
well-thought-out at all to me. Also the end result would have to
be much more invasive than you suggest here, since there are many
more programs besides pg_ctl that use libpq.

> + #ifdef __CYGWIN__
> + static const int conns[] = {60, 50, 40, 30, 20, 10, 5};
> + #else
> static const int conns[] = {100, 50, 40, 30, 20, 10};
> + #endif

This part is just silly. If your system can't support ten connections
I think you need to fix your system. Also, we are not in the habit of
plastering the source with platform-specific ifdefs just to save a
couple of cycles during initialization. If the probe at 100 caused an
actual failure on cygwin, I'd accept such a patch, but not otherwise.
How legible do you think this code would be if we tried to #ifdef in
platform-specific limits for every port we support?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Reini Urban 2004-10-09 16:24:50 Re: cypg.dll, libpq_a, initdb max_connections 60
Previous Message Reini Urban 2004-10-09 13:41:18 cypg.dll, libpq_a, initdb max_connections 60