cypg.dll, libpq_a, initdb max_connections 60

From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: cypg.dll, libpq_a, initdb max_connections 60
Date: 2004-10-09 13:41:18
Message-ID: 4167EA7E.1000001@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

1. cyg-pgdll.patch
For the cygwin port I found out that we'd need a better name for libpq
libraries only, and that the name pq.dll is not a good one. It would
clash with the mingw version, which might get copied into the path.
We have out own standards, esp. when dealing with import libs, which
would require the "cyg" prefix for pq.dll.

I also did't find the version-info linker switches, though I found some
discussion that it should be used. Even WIN32 has versioning now via the
.rc. So added them for our port. You might want that also for all gnu
gcc ports.

This patch is for src/bin/pg_ctl/Makefile only.
With this patch we might want to rename libpq.a to libpq.dll.a in our
install step later.

2. cyg-pgdll+libpq_a.patch
Rename to libpq.dll.a and cygpq.dll.
The former patch is not needed then.
Reason: We have some magic dealing with -lpq, which picks up
/usr/lib/libpq.dll.a automatically.
Esp. libtool is not very clever, when trying to use old-style libpq.a
name. This patch has to deal with the $(libpq_builddir)/libpq.a
dependency in src/bin/*/Makefile and src/interfaces/libpq/Makefile.
It also changes the linker line to always pick up our current libpq.a
instead of -L$(libpq_builddir) -lpq.

This is not a must for cygwin. cyg-pgdll.patch would be enough.
It is also not perfect: Because of some overriding (have to study info
make) it recompiles cygpg.dll and libpg.dll.a for every client target.

PS: I personally would vastly prefer libtool.
The .la files will help immensily in testing and installing. But this is
only an issue for libpg, and probably not worth the effort.

3. cyg-initdb.patch
limit initdb max_connections for cygwin.
cygwin has a hard-coded limit of max 63 subprocesses in cygwin1.dll.
So 100 is not a good value to start with. I've set that to 60.
http://archives.postgresql.org/pgsql-cygwin/2002-09/msg00002.php
Fixing src/backend/utils/misc/postgresql.conf.sample would be stupid.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Attachment Content-Type Size
cyg-pgdll.patch text/plain 1.3 KB
cyg-pgdll+libpq_a.patch text/plain 2.1 KB
cyg-initdb.patch text/plain 489 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-10-09 15:18:28 Re: cypg.dll, libpq_a, initdb max_connections 60
Previous Message Neil Conway 2004-10-09 12:08:54 minor code cleanup