Re: pg_locks doesn't check for interrupts?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_locks doesn't check for interrupts?
Date: 2014-11-18 18:47:32
Message-ID: 17240.1416336452@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Since querying pg_locks can be intrusive due to needing to lock the lock
> partitions, when I'm collecting data about locks I generally put a
> statement_timeout on it. However, I'm noticing that this
> statement_timeout appears to be completely ignored; I've seen this query
> run for up to 10 minutes* when the database is heavily loaded. This it
> seems likely to me that the functions under pg_locks aren't checking for
> interrupts. Anybody checked this already?

Whether they do or not, I don't think we allow CHECK_FOR_INTERRUPTS to
trigger while holding an LWLock. So this would not be a trivial thing
to fix.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-11-18 18:50:29 Re: pg_locks doesn't check for interrupts?
Previous Message Josh Berkus 2014-11-18 18:42:58 pg_locks doesn't check for interrupts?