Re: Sleep functions - Mailing list pgsql-hackers

From Michael Adler
Subject Re: Sleep functions
Date
Msg-id 20050822133022.GA25930@pobox.com
Whole thread Raw
In response to Re: Sleep functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Sleep functions  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sun, Aug 21, 2005 at 09:13:20PM -0400, Tom Lane wrote:
> Michael Fuhr <mike@fuhr.org> writes:
> > What do people think of exposing pg_usleep() to the user?
> 
> I'm not real enthused about it.  Generally speaking, a sleep() on the
> database side means you are idling while holding locks, and that does
> not seem like something we want to encourage people to do.
> 
> As other responders noted, it's trivial to program this in any of the
> untrusted PL languages,  So what you're really proposing is that we give
> sleep() to non-superusers, and that seems like a bit of a hard sell.
> Let's see a use-case or three.

There may be a better alternative, but wouldn't this let application
writers easily test the effects of a long running transaction?
-Mike


pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: PostgreSQL 8.0.3 and Ipv6
Next
From: Palle Girgensohn
Date:
Subject: Re: Win32 unicode vs ICU