Re: pgsql: Refactor script execution state machine in pgbench.

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Refactor script execution state machine in pgbench.
Date: 2016-09-27 06:38:24
Message-ID: alpine.DEB.2.20.1609270828030.6970@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


Hello Tom,

> I think the problem is here (pgbench.c lines 4550):

Hmmm... Indeed "typedef char bool;". I thought postgresql bool was an
int, I usually do "typedef enum { false, true } bool;"

> I see a number of other things that look pretty infelicitous in this
> code --- for example, why is the loop at lines 4440 break'ing after
> it comes across the first socket to wait for?

Indeed this seems strange. I will have a look at that as well.

I'll try to look at these tonight, or if I can't by the end of the week.

--
Fabien.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2016-09-27 06:38:46 Re: pgsql: Refactor script execution state machine in pgbench.
Previous Message Alvaro Herrera 2016-09-27 04:07:08 pgsql: Include <sys/select.h> where needed