Skip site navigation (1) Skip section navigation (2)

Re: Hot Standy introduced problem with query cancel behavior

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hot Standy introduced problem with query cancel behavior
Date: 2009-12-29 13:14:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sun, Dec 27, 2009 at 10:42 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Thanks for the report. I'll see about a fix.

In the end we are about to use SIGINT for two use cases:

 - cancel an idle transaction
 - cancel a running query

Previously a backend that was DoingCommandRead == true didn't do
anything upon reception of SIGINT, now it aborts either the running
query or the idle transaction, which is why Kris's example behaves
differently now.

If we use the same signal for both cases, the receiving backend cannot
tell what the intention of the sending backend was. That's why I
proposed to make SIGINT similar to SIGUSR1 where we write a reason to
a shared memory structure first and then send the signal (see from
a few days ago).

There was also some dicussion about how to communicate the
cancellation back to the client when its idle transaction got aborted.
I implemented what I thought was the conclusion of the discussion but
haven't received a reply on it yet.


In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2009-12-29 13:33:17
Subject: Re: Add subdirectory support for DATA/DOCS with PGXS
Previous:From: Guillaume LelargeDate: 2009-12-29 13:12:52
Subject: Re: Application name patch - v3

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group