Re: Let's invent a function to report lock-wait-blocking PIDs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Let's invent a function to report lock-wait-blocking PIDs
Date: 2013-03-21 03:36:24
Message-ID: 804.1363836984@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On 20 March 2013 18:02, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The API that comes to mind is (name subject to
>> bikeshedding)
>>
>> pg_blocking_pids(pid int) returns int[]

> Useful. Can we also have an SRF rather than an array?

I thought about that, but at least for the isolationtester use-case,
the array result is clearly easier to use. You can get from one to the
other with unnest() or array_agg(), so I don't really feel a need to
provide both. Can you generate use-cases where the set-result approach
is superior?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2013-03-21 03:42:12 Re: [pgsql-advocacy] Call for Google Summer of Code mentors, admins
Previous Message Noah Misch 2013-03-21 01:48:00 Re: Let's invent a function to report lock-wait-blocking PIDs