Re: pgbench bug / limitation

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jawarilal, Manish" <Manish(dot)Jawarilal(at)dell(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench bug / limitation
Date: 2020-06-02 11:27:48
Message-ID: alpine.DEB.2.22.394.2006021258170.87735@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
pgbench-select-win-1.patch text/x-diff 861 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyle Kingsbury 2020-06-02 16:18:52 Re: Potential G2-item cycles under serializable isolation
Previous Message Konstantin Knizhnik 2020-06-02 08:24:59 Problem with accessing OTAST data in stored procedures