Re: pgsql-server/ /configure /configure.in rc/incl ...

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: <pgsql-committers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)postgresql(dot)org>
Subject: Re: pgsql-server/ /configure /configure.in rc/incl ...
Date: 2003-03-06 03:30:11
Message-ID: 032f01c2e390$b1842b20$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-performance

Has anyone ever thought about adding kqueue (for *BSD) support to Postgres,
instead of using select?

LIBRARY
Standard C Library (libc, -lc)

SYNOPSIS
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>

int
kqueue(void);

int
kevent(int kq, const struct kevent *changelist, int nchanges,
struct kevent *eventlist, int nevents,
const struct timespec *timeout);

EV_SET(&kev, ident, filter, flags, fflags, data, udata);

DESCRIPTION
kqueue() provides a generic method of notifying the user when an event
happens or a condition holds, based on the results of small pieces of
kernel code termed filters. A kevent is identified by the (ident, fil-
ter) pair; there may only be one unique kevent per kqueue.

The filter is executed upon the initial registration of a kevent in
order
to detect whether a preexisting condition is present, and is also exe-
cuted whenever an event is passed to the filter for evaluation. If the
filter determines that the condition should be reported, then the
kevent
is placed on the kqueue for the user to retrieve.

The filter is also run when the user attempts to retrieve the kevent
from
the kqueue. If the filter indicates that the condition that triggered
the event no longer holds, the kevent is removed from the kqueue and is
not returned.

Chris

> CVSROOT: /cvsroot
> Module name: pgsql-server
> Changes by: tgl(at)postgresql(dot)org 03/03/05 22:16:56
>
> Modified files:
> . : configure configure.in
> src/include : pg_config.h.in
> src/interfaces/libpq: fe-misc.c
>
> Log message:
> Use poll(2) in preference to select(2), if available. This solves
> problems in applications that may have a large number of files open,
> such that libpq's socket number exceeds the range supported by fd_set.
> From Chris Brown.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2003-03-06 03:34:27 Re: pgsql-server/ /configure /configure.in rc/incl ...
Previous Message Tom Lane 2003-03-06 03:16:56 pgsql-server/ /configure /configure.in rc/incl ...

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-03-06 03:34:27 Re: pgsql-server/ /configure /configure.in rc/incl ...
Previous Message Tom Lane 2003-03-06 03:16:56 pgsql-server/ /configure /configure.in rc/incl ...