Re: pgsql-server/ /configure /configure.in rc/incl ... - Mailing list pgsql-committers

From Sean Chittenden
Subject Re: pgsql-server/ /configure /configure.in rc/incl ...
Date
Msg-id 20030311041133.GC79234@perrin.int.nxad.com
Whole thread Raw
In response to Re: pgsql-server/ /configure /configure.in rc/incl ...  ("Marc G. Fournier" <scrappy@hub.org>)
List pgsql-committers
> > Heh, kqueue is _the_ reason to use FreeBSD.
> >
> > http://www.kegel.com/dkftpbench/Poller_bench.html#results
> >
> > I've toyed with the idea of adding this because it is monstrously more
> > efficient than select()/poll() in basically every way, shape, and
> > form.
>
> I would personally be interested in seeing patches ... what would be
> involved?

Whoa!  Surprisingly, much less than I expected!!!  A small shim would
have to be put in place to abstract away returning valid file
descriptors that are ready to be read()/write().  What's really cool,
is there are only a handful of places that'd have to be updated (as
far as I can tell):

src/backend/access/transam/xact.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/storage/lmgr/s_lock.c
src/bin/pg_dump/pg_dump.c
src/interfaces/libpq/fe-misc.c

Then it'd be possible to have clients/servers switch between kqueue,
poll, select, or whatever the new flavor of alerting from available IO
fd's.  I've added it to my personal TODO list of things to work on.
If someone beats me to it, cool, it's just something that one day I'll
get to (hopefully).  -sc

--
Sean Chittenden

pgsql-committers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: pgsql-server/ /configure /configure.in rc/incl ...
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: pgsql-server/ /configure /configure.in rc/incl ...