[dev] conflics with libpq

Igor Sysoev is at rambler-co.ru
Sun Sep 16 22:06:04 MSD 2007


On Sun, Sep 16, 2007 at 07:51:56PM +0200, Manlio Perillo wrote:

> Igor Sysoev ha scritto:
> >On Sun, Sep 16, 2007 at 07:02:55PM +0200, Manlio Perillo wrote:
> >
> >[...]
> >>>If nginx is built on Linux it may be due to
> >>>
> >>>#define _FILE_OFFSET_BITS  64
> >>Yes, I'm un Linux Debian Etch.
> >
> >All modules are built with _FILE_OFFSET_BITS 64.
> >Your module with libpq inclusion before nginx headers is built with
> >_FILE_OFFSET_BITS 32.
> >
> 
> But:
> $grep -r _FILE_OFFSET_BITS /usr/include/postgresql/
> /usr/include/postgresql/pg_config.h:#define _FILE_OFFSET_BITS 64

Looking installation on one of my hosts I see that libpq-fe.h does not
include it. It is server only header, but not library's one.

> >By the way how do you use libpq - in blocking on none-blocking mode ?
> >
> 
> For now in blocking mode.
> 
> This for three reasons:
> 1) It is simpler
> 2) You can execute a new asyncronous command only after the previous one
>    has been completed.
>    However it is not clear from
>    http://www.postgresql.org/docs/8.1/static/libpq-async.html
>    if this is a limitation of PQsendQuery only.
> 
>    The problem is that the PostgreSQL protocol does allow multiple
>    requests, but since commands are not tagged it is problematic
>    to figure out what is happening.
> 3) I have yet to understand how the nginx event module works and how
>    to register my events given an existing opened socket

I do not mean sending request via one postresql connection.
When your module does "send query/wait result/read result", all
other connections of this nginx worker are not handled.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list