Re: TODO-item: Add sleep() function, remove from regress.c

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: TODO-item: Add sleep() function, remove from regress.c
Date: 2006-01-10 10:31:13
Message-ID: 20060110103113.GA2492@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Mon, Jan 09, 2006 at 08:50:36PM -0500, Tom Lane wrote:
> pg_sleep seems like a better idea to me too.

ok, renamed again.

> Why is the function defined to take numeric rather than float8?
> float8 is a whole lot easier to work with internally.

ok, changed.

> The proposed regression test seems unacceptably fragile, as well as
> rather pointless.

Why is it fragile? Which other regression test do you suggest? Or should it
go without one?

On Mon, Jan 09, 2006 at 08:54:49PM -0500, Tom Lane wrote:
> BTW, a serious problem with just passing it off to pg_usleep like that
> is that the sleep can't be aborted by a cancel request

No, cancelling the sleep works (at least for Unix). Isn't cancelling
implemented via a signal that interrupts select() ?

Anyway, I've changed it, removing the ~2000s limit is a good point.

I append a new version with the regression test ripped out.

Joachim

Attachment Content-Type Size
pg_sleep.reworked.diff text/plain 8.4 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-01-10 14:58:26 Re: TODO-item: Add sleep() function, remove from regress.c
Previous Message Tom Lane 2006-01-10 02:43:42 Re: [HACKERS] Inconsistent syntax in GRANT