Re: [Review] pgbench duration option

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Ragnar <gnari(at)hive(dot)is>
Subject: Re: [Review] pgbench duration option
Date: 2008-09-11 10:58:52
Message-ID: 48C8F9EC.4010305@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> ITAGAKI Takahiro wrote:
>> Here is a revised version of the pgbench duration patch.
>
> Looking at the Win32 timer implementation, it's a bit different from the
> one we have in src/backend/port/win32/timer.c. The one in timer.c uses a
> separate thread and WaitForSingleObjectEx() to wait, while your
> implementation uses CreateTimerQueue() and CreateTimerQueueTimer().
> Yours seems simpler, so I wonder why the timer.c is different?

Probably because it was written back when we supported NT4, and the
CreateTimerQueue() stuff requires Windows 2000 to work.

> It's not too bad as it is in the patch, but it would be nice to put the
> setitimer() implementation into src/port, and use the same code in the
> backend as well.

I haven't looked at the patch ;-), but the implementation in
backend/port is tied into the signal emulation layer that's also in
backend/port, so I think doing such a move will require moving a lot
more than just the timer code...

//Magnus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-09-11 11:12:01 Re: Postgresql coding conventions
Previous Message Simon Riggs 2008-09-11 10:20:38 Re: Transaction Snapshots and Hot Standby