Re: [PATCH] pg_sleep(interval)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_sleep(interval)
Date: 2014-02-03 19:34:34
Message-ID: CA+Tgmoa3c3EttpThB5LyPTVdH6u7meZ_v-YdTPGu6rX3b5d54A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 2, 2014 at 4:50 AM, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> It seems like pg_sleep_until() has issues if used within a transaction, as
> it uses now() and not clock_timestamp(). Please find attached a patch that
> solves this issue.
>
> For consistency reasons, I also modified pg_sleep_for() to also use
> clock_timestamp.

Good catch!

Committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-02-03 20:17:31 Re: plpgsql.warn_shadow
Previous Message Tomas Vondra 2014-02-03 19:02:31 Re: GIN improvements part2: fast scan