Re: Sleep functions

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sleep functions
Date: 2005-08-22 14:58:42
Message-ID: 7066b7c826c4a7559418e734d6ce6703@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> In any case, I wonder how many people, not having a sleep() function,
> effect a delay with a busy loop; an example of such has been posted
> in response to the thread in pgsql-admin, and didn't the regression
> tests do so until recently? That seems less desirable than a real
> sleep().

Exactly. If people are going to do it anyways, we might as well provide
a better interface. And sleep() is going to be less expensive than
any home-brewed sleep simulation.

> To others who've written their own sleep() function: what are you
> using it for?

To properly emulate other, slower, RDBMSs? :)

To simulate long-running queries without actually invoking them, and
to simulate concurrency of shorter queries.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200508221055
https://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkMJ5/QACgkQvJuQZxSWSsi7DwCfcVKyclkFZ5swp/jBvrT3lwq8
P4cAnRh/1WwCAwM/v2bItKKJBMD8ARNT
=itDC
-----END PGP SIGNATURE-----

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-08-22 15:53:22 Re: Sleep functions
Previous Message Greg Stark 2005-08-22 14:49:06 Re: Sleep functions