Re: 'Waiting on lock'

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: 'Waiting on lock'
Date: 2007-05-30 16:56:36
Message-ID: 20070530165636.GA7531@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> >> It'd be relatively painless to make that happen as part of the
> >> deadlock-check timeout function, but that's typically only a one-second
> >> delay not a "few seconds". I think it'd likely be overly chatty.
>
> > Yeah, I wouldn't want one per second. Do we already track how long
> > we've been waiting?
>
> No, because we're *asleep*. You'd have to add an additional
> timeout-interrupt reason. Plus there's a ton of interesting questions
> about what's safe to do from an interrupt service routine.

Eh, I wouldn't really want to add an additional timeout-interrupt if we
could avoid it. Sorry, hadn't followed what you meant (honestly, I
expected us to already have some kind of timeout loop when waiting, nice
to know that we don't :). As I mentioned to Alvaro, a single NOTICE
after a full second of waiting would be fine for my use case, at least.
My main concern was that it'd be one-per-second, which would be too
much.

I agree with your concern about doing things from an ISR though...

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-05-30 17:09:35 Ye olde drop-the-database-you-just-left problem
Previous Message Enrico Sirola 2007-05-30 16:55:29 table partitioning pl/pgsql helpers