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 Langote <amitlangote09(at)gmail(dot)com>, 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 15:49:07
Message-ID: 16426.1369324147@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:
> Right.I believe this is part of the standard way in which we handle
> interrupts,right? Making sure that we cancel a query when the backend
> is in a state to do so,not when the interrupt actually comes in,right?

Right, the actual signal handler will only kill the query immediately
if the backend is in a safe state (eg, while it's waiting for a
heavyweight lock). Otherwise it just sets a flag that's checked by
CHECK_FOR_INTERRUPTS. See StatementCancelHandler in postgres.c.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Atri Sharma 2013-05-23 15:50:19 Re: Time limit for a process to hold Content lock in Buffer Cache
Previous Message Merlin Moncure 2013-05-23 15:47:01 Re: Time limit for a process to hold Content lock in Buffer Cache