Re: Time limit for a process to hold Content lock in Buffer Cache - Mailing list pgsql-hackers

From Atri Sharma
Subject Re: Time limit for a process to hold Content lock in Buffer Cache
Date
Msg-id CAOeZVidcTkp+uCPJYXX7Gjje6nv5GAReKpTMU=f5PsQyOTdsuQ@mail.gmail.com
Whole thread Raw
In response to Re: Time limit for a process to hold Content lock in Buffer Cache  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Time limit for a process to hold Content lock in Buffer Cache  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, May 23, 2013 at 8:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Atri Sharma <atri.jiit@gmail.com> writes:
>> On a different note, shouldn't we have a time out for a content lock
>> in buffer cache?
>
> No; the overhead of setting up and canceling such a timeout would
> greatly outweigh any possible benefit.
>
> Generally speaking, LWLocks are not meant to be used in situations where
> the lock hold time might be long enough to justify worrying about
> timeouts.  If you need that kind of behavior, use a heavyweight lock.

Right, the overheads,especially in case of interruptions would be high.

I was musing over a possible condition where a rogue client gets the
backend to process queries which take a *lot* of time(note, this is
only in my head atm.I may be completely wrong here).

Wouldnt something on the lines of a timeout help here?

Regards,

Atri

--
Regards,

Atri
l'apprenant



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Time limit for a process to hold Content lock in Buffer Cache
Next
From: Tom Lane
Date:
Subject: Re: Time limit for a process to hold Content lock in Buffer Cache