Re: pg_sleep_enhancements.patch

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Subject: Re: pg_sleep_enhancements.patch
Date: 2014-01-29 19:38:06
Message-ID: CAFj8pRBEryyMfkXg_e7Eg97yzCXSjPHxyhpnASwmY5wisixL1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-01-29 Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>

> On 01/29/2014 08:21 PM, Pavel Stehule wrote:
> > second question - is not this functionality too dangerous? If somebody
> > use it as scheduler, then
> >
> > a) can holds connect, session data, locks too long time
> > b) it can stop on query timeout probably much more early then user expect
> >
> > What is expected use case?
>
> It is no more dangerous than plain pg_sleep(). The use case is
> convenience and clarity of code.
>
> I don't think people will be using it as a scheduler any more than they
> do with pg_sleep() because it can't cross transaction boundaries.
>

I am sure so experienced user didn't use it. But beginners can be messed
due similarity with schedulers.

I invite a) documented these risks b) opinion of other hackers

Probably when it is used as single statement in transaction, then it can
breaks only vacuum

Pavel

>
> --
> Vik
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-01-29 19:50:29 Re: Add force option to dropdb
Previous Message Heikki Linnakangas 2014-01-29 19:36:55 Re: [PATCH] Use MAP_HUGETLB where supported (v3)