Re: Time limit for a process to hold Content lock in Buffer Cache

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Time limit for a process to hold Content lock in Buffer Cache
Date: 2013-05-23 14:31:53
Message-ID: 15602.1369319513@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Atri Sharma <atri(dot)jiit(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Atri Sharma 2013-05-23 14:35:23 Re: Time limit for a process to hold Content lock in Buffer Cache
Previous Message Thom Brown 2013-05-23 14:03:51 Re: pg_rewind, a tool for resynchronizing an old master after failover