Re: pgbench bug / limitation - Mailing list pgsql-bugs

From Fabien COELHO
Subject Re: pgbench bug / limitation
Date
Msg-id alpine.DEB.2.22.394.2006021258170.87735@pseudo
Whole thread Raw
In response to Re: pgbench bug / limitation  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: pgbench bug / limitation  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-bugs
Attached is a blind attempt at working around the issue based on what you 
show below, that I cannot test.

> typedef struct fd_set {
>        u_int fd_count;               /* how many are SET? */
>        SOCKET  fd_array[FD_SETSIZE];   /* an array of SOCKETs */
> } fd_set;
>
> #define FD_SET(fd, set) do { \
>    u_int __i; \
>    for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \
>        if (((fd_set FAR *)(set))->fd_array[__i] == (fd)) { \
>            break; \
>        } \
>    } \
>    if (__i == ((fd_set FAR *)(set))->fd_count) { \
>        if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) { \
>            ((fd_set FAR *)(set))->fd_array[__i] = (fd); \
>            ((fd_set FAR *)(set))->fd_count++; \
>        } \
>    } \
> } while(0, 0)

-- 
Fabien.
Attachment

pgsql-bugs by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Problem with accessing OTAST data in stored procedures
Next
From: Kyle Kingsbury
Date:
Subject: Re: Potential G2-item cycles under serializable isolation