pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ERROR:  canceling query due to user request
14+ messages / 4 participants
[nested] [flat]

* ERROR:  canceling query due to user request
@ 2003-12-18 09:23 Iain <iain@mst.co.jp>
  2003-12-19 18:11 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 14+ messages in thread

From: Iain @ 2003-12-18 09:23 UTC (permalink / raw)
  To: pgsql-admin

Hi All,

I had been having some problems since yesterday with dumping/loading data
and even running vacuum analyse. The good news is that I've sorted it out
and things seem to running smoothly again.

There may be a bug in there somewhere, or at least a degree of fragility
that may deserve some attention. I'm writing this now in the hope of getting
any feedback on what happened that anyone might have, and perhaps it might
help someone out in the future.

After a successful stress test of backup and restore 2 days ago, nothing was
working today.
The problem seemed to stem from some (I thought) innocuous changes I made to
the postgresql.conf file.
Reverting to the original file has rectified the problem.

This is typical of the errors I got:

pg_dump: ERROR:  canceling query due to user request
pg_dump: SQL command to dump the contents of table "d_hi_mise_item_uri"
failed: PQendcopy() failed.
pg_dump: Error message from server: ERROR:  canceling query due to user
request
pg_dump: The command was: COPY public.d_hi_mise_item_uri (ymd_uri, tenpo_cd,
item_id, urisuu, urikin, araridaka,
 lst_genka, ave_genka, logic_tana_suu, henpintyuu_suu, tenji_suu, tuika_suu,
idou_in_suu, idou_out_suu, rank_new
_suu, rank_old_suu) TO stdout;


The part "ERROR:  canceling query due to user request" is the main part. It
occured during vacuum analyse too.

I setup a new server from scratch and got similar errors. It was significant
that I had copied the conf files from the previous installation.

These are the settings that I changed:

tcpip_socket = true
shared_buffers = 2048
wal_buffers = 16
checkpoint_segments = 8
effective_cache_size = 50000
random_page_cost = 2
statement_timeout = 30000

I thought that these are pretty conservative settings, even for my system.
but maybe not.

On the old server (Version is 7.4 running on turbo linux 7 (kernal
2.4.18-15, libc ver 2.2.4-13)) under virtual pc under windows 2000) . The
Linux kernal settings are default, and the PC has 1GB of RAM, at about half
of which should be available to the the linux system.

I'm going to experiment with the conf settings one at a time from now and
see what happens. I'm also hoping to remove the need for virtual PC as it
seems to complicate configuration. Unfortunately the development server
doesn't resemble the intended production configuration in the least, so it
seems somewhat pointless anyway.

regards
Iain

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
  2003-12-18 09:23 ERROR:  canceling query due to user request Iain <iain@mst.co.jp>
@ 2003-12-19 18:11 ` Tom Lane <tgl@sss.pgh.pa.us>
  2003-12-24 02:10   ` Re: ERROR: canceling query due to user request Iain <iain@mst.co.jp>
  0 siblings, 1 reply; 14+ messages in thread

From: Tom Lane @ 2003-12-19 18:11 UTC (permalink / raw)
  To: Iain <iain@mst.co.jp>; +Cc: pgsql-admin

"Iain" <iain@mst.co.jp> writes:
> This is typical of the errors I got:
> pg_dump: ERROR:  canceling query due to user request

If you didn't actually do anything to cancel the query, then this
indicates that something is sending SIGINT signals to the backend
process.  I'd bet on a "ulimit" or equivalent resource-limit setting
being tripped.  Check what conditions the postmaster is being started
under --- generally, you do not want *any* active ulimit restrictions
on the server processes.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
  2003-12-18 09:23 ERROR:  canceling query due to user request Iain <iain@mst.co.jp>
  2003-12-19 18:11 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-12-24 02:10   ` Iain <iain@mst.co.jp>
  0 siblings, 0 replies; 14+ messages in thread

From: Iain @ 2003-12-24 02:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Hi Tom,

I agree with your assessment of this.

I'm no expert on Linux, and I'm new to Postgres but I'm learning. I hope to
have a chance to play with and test these kinds of configuration settings
before the system goes live. Unfortunately there is no plan for a test
environment that is comparable to the production environment.

By the way, I've been using 7.4 for a little while now (in development) and
my feeling is that the DB has matured considerably since the previous
version I used which was 7.1. It's looking good so far.

Regards
Iain

----- Original Message ----- 
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Iain" <iain@mst.co.jp>
Cc: <pgsql-admin@postgresql.org>
Sent: Saturday, December 20, 2003 3:11 AM
Subject: Re: [ADMIN] ERROR: canceling query due to user request


> "Iain" <iain@mst.co.jp> writes:
> > This is typical of the errors I got:
> > pg_dump: ERROR:  canceling query due to user request
>
> If you didn't actually do anything to cancel the query, then this
> indicates that something is sending SIGINT signals to the backend
> process.  I'd bet on a "ulimit" or equivalent resource-limit setting
> being tripped.  Check what conditions the postmaster is being started
> under --- generally, you do not want *any* active ulimit restrictions
> on the server processes.
>
> regards, tom lane




^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* ERROR: canceling query due to user request
@ 2005-09-12 20:54 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2005-09-12 22:39 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 14+ messages in thread

From: Kevin Grittner @ 2005-09-12 20:54 UTC (permalink / raw)
  To: pgsql-admin

I started with this issue on the pgsql-jdbc list, but was assured that this could not be a bug in the JDBC driver -- it is either a bug in the configuration or runtime environment or it is a server-side bug.  This list seemed like the logical next step.
 
We have seen this behavior in 8.0.3 with the 311 JDBC driver.  Today I tested with the latest snapshot of the 8.1 development code and the tip of the JDBC driver code from the root.  It still happens.
 
The environment for the latest test is:
SuSE Linux 9.3 (i586)
2.6.11.4-21.8-smp #1 SMP Tue Jul 19 12:42:37 UTC 2005
Dual Xeon
Disk on 7 spindle RAID 5 via SAN
All access through JDBC connections.
A single thread accessing the database.
A connection pool in use -- the thread may grab a different connection each time.
No other process concurrently executing against the database.
Happens with or without autovacuum running.
 
Failures have also occured on Windows 2000 and Windows XP servers with local hard drives.  Xeons in all cases.
 
The software involved "optimistically" tries to do a series of inserts, updates, and/or deletes in a single database transaction.  If an exception occurs (for example an insert of a row which already exists) or an update affects zero rows, the transaction is rolled back and the operations are attempted in "cautious" mode -- a commit after each insert update or delete of a single row.
 
The client is running full out, with a steady supply of ready-to-go requests.  Client CPU seems to be the bottleneck, rather than anything on the database server hardware.  We are only seeing this problem in "cautious" mode -- a database transaction has been rolled back and we're committing each statement as we go.
 
If we run the same set of data multiple times, the error occurs on different requests each time, indicating it is not data dependent.  If we turn on logging at the JDBC driver level, it never happens, indicating that it is timing sensitive.  We've never seen it while stepping through the debugger, but since it seems to happen randomly once every few thousand requests, that would be a unlikely anyway.
 
The error is manifest by this message and stack trace:
 
org.postgresql.util.PSQLException: ERROR: canceling query due to user request
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1499)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1284)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:617)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:637)
	at (our application code)
 
There is no method in the JDBC interface to cancel a commit from the client side, and there is nothing in the client code which is trying to do so.  There are no processes running on the server except services from the SuSE install and the processes started by pg_ctl start.
 
We tried setting the ulimit of everything to unlimited, where allowed.  We set the open files limit to 4096.  These ulimit changes had no affect on the problem.
 
Does anyone have any ideas on a possible cause, or any diagnostic steps we should take?
 
Thanks,
 
-Kevin
 





^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
  2005-09-12 20:54 ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2005-09-12 22:39 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2005-09-12 22:39 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> org.postgresql.util.PSQLException: ERROR: canceling query due to user request

The only possible trigger of that message is a SIGINT sent to the backend.
Now the backend will SIGINT itself if a statement timeout expires, so one
possibility is that you have statement_timeout set and it's getting
exceeded.  Otherwise you need to be looking for external causes.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
@ 2005-09-13 13:51 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 14+ messages in thread

From: Kevin Grittner @ 2005-09-13 13:51 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-admin

Thanks, Tom.
 
The statement_timeout setting was also raised on the JDBC list, and has been checked -- there is nothing setting statement_timeout.  The connection shows this value at zero.  None of our code contains anything PostgreSQL specific, so there is nothing in our framework or applications that would be aware of the "set statement_timeout" command to be able to issue it.  I created the database instance, the user and the database, and have not set this as a default anywhere.
 
Regarding the possibility that a ulimit setting is sending the signal, I am using "su" to set user id to root, issuing the ulimit statements to set everything unlimited or very high, then using "su" to set user id to postgres.  At that point the settings from root still show.  Then I'm starting postgres using pg_ctl.  Is there any reason the ulimit settings would not carry through with this approach?  Is there a better way to do it?
 
Other than that, what external causes might be at fault when I have both Windows machines and Linux machines which have nothing installed but the operating system and PostgreSQL?  The only ulimit settings I couldn't set to "unlimited" were pipe size and open files.  Is there any chance that the error/rollback path in the code is leaking open files on the server?  Is there anything I should run during the test to watch for potential resource exhaustion?
 
-Kevin
 
 
>>> Tom Lane <tgl@sss.pgh.pa.us> 09/12/05 5:39 PM >>>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> org.postgresql.util.PSQLException: ERROR: canceling query due to user request

The only possible trigger of that message is a SIGINT sent to the backend.
Now the backend will SIGINT itself if a statement timeout expires, so one
possibility is that you have statement_timeout set and it's getting
exceeded.  Otherwise you need to be looking for external causes.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
@ 2005-09-13 14:51 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2005-09-13 16:31 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 14+ messages in thread

From: Kevin Grittner @ 2005-09-13 14:51 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-admin

One more thought -- I keep coming back to the fact that when we turn on logging in the JDBC driver on the client side, the problem does not occur.  The only possible reason I can see for this having any affect on the problem is the small delay introduced by the synchronous logging.  Since this is only showing up on commit of a database transaction which follows close on the heels of a rollback on the same connection, is there any chance that there is some very small "settling time" needed for a rollback, and we're sometimes getting in ahead of this?
 
-Kevin
 
 
>>> Tom Lane <tgl@sss.pgh.pa.us> 09/12/05 5:39 PM >>>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> org.postgresql.util.PSQLException: ERROR: canceling query due to user request

The only possible trigger of that message is a SIGINT sent to the backend.
Now the backend will SIGINT itself if a statement timeout expires, so one
possibility is that you have statement_timeout set and it's getting
exceeded.  Otherwise you need to be looking for external causes.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
  2005-09-13 14:51 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2005-09-13 16:31 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2005-09-13 16:31 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> One more thought -- I keep coming back to the fact that when we turn
> on logging in the JDBC driver on the client side, the problem does not
> occur.  The only possible reason I can see for this having any affect
> on the problem is the small delay introduced by the synchronous
> logging.  Since this is only showing up on commit of a database
> transaction which follows close on the heels of a rollback on the same
> connection, is there any chance that there is some very small
> "settling time" needed for a rollback, and we're sometimes getting in
> ahead of this?

(1) No.

(2) Even if we posit the existence of such a serious bug as that, it
wouldn't explain how control gets to the SIGINT response code.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
@ 2005-09-13 17:25 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2005-09-13 18:18 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 14+ messages in thread

From: Kevin Grittner @ 2005-09-13 17:25 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-admin

I'm having a really hard time coming up with theories about the cause
or things to check.
 
We ran the test again with logging to disk, and it didn't happen in an
hour of testing.  The logging boosted the average run time of the
series of database modificates we attempt as a single transaction
from 44 ms to 58 ms.  We logged to a dummy PrintWriter, which just
returned to driver code without doing anything, and the time went to
50 ms.  We got our first error after 9 minutes with that configuration.
 
The only thing running on the server is the postgres back end.  It would
be hard to imagine something outside of the postgres software itself
which would be able to send the signal only when a rollback occurred.
Can you think of anything which could be coming through the protocol
stream which would cause this signal during the commit after a rollback?
 
About the only other thing I can think to do is to try to come up with
a RAM-based PrintWriter to keep a rolling buffer of JDBC logging
which it would dump when we get the error.  Since a PrintWriter which
did absolutely nothing was right on the edge of blocking the problem,
I'm skeptical that adding even that much will allow the problem to show.
 
I welcome all suggestions on what to try or what to monitor.
 
-Kevin
 
 
>>> Tom Lane <tgl@sss.pgh.pa.us> 09/13/05 11:31 AM >>>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> One more thought -- I keep coming back to the fact that when we turn
> on logging in the JDBC driver on the client side, the problem does not
> occur.  The only possible reason I can see for this having any affect
> on the problem is the small delay introduced by the synchronous
> logging.  Since this is only showing up on commit of a database
> transaction which follows close on the heels of a rollback on the same
> connection, is there any chance that there is some very small
> "settling time" needed for a rollback, and we're sometimes getting in
> ahead of this?

(1) No.

(2) Even if we posit the existence of such a serious bug as that, it
wouldn't explain how control gets to the SIGINT response code.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
  2005-09-13 17:25 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2005-09-13 18:18 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 14+ messages in thread

From: Tom Lane @ 2005-09-13 18:18 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> I'm having a really hard time coming up with theories about the cause
> or things to check.

Have you tried strace'ing the backend process to see if you can see a
signal being delivered to it?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
@ 2005-09-13 20:14 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2005-09-13 22:18 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 14+ messages in thread

From: Kevin Grittner @ 2005-09-13 20:14 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: pgsql-admin

Thanks, Tom.  An excellent suggestion.  (This 50 year old dog has
today learned a new trick.)
 
There is good news and bad news.  The good news is that I found
the cause, and we can keep this from happening with a change on
our end.  The bad news is that I think it also points to a backend bug,
although not as serious as the potential (hypothetical) one I was
asking about earlier.
 
For the record (and the benefit of anyone with similar problems who
may search the archives), I got the connection pool set up, and found
the pids for the connection processes like this:
 
# ps aux|grep postgres
postgres 18307  0.0  0.0   3052  1100 pts/0    S    Sep09   0:00 su postgres
postgres 18308  0.0  0.0   3408  1828 pts/0    S+   Sep09   0:00 bash
postgres 15463  0.0  0.1  89508  3852 pts/0    S    10:09   0:05 /usr/local/pgsql/bin/postmaster -D /var/pgsql/data
postgres 15466  0.0  4.0  89652 83004 pts/0    S    10:09   0:00 postgres: writer process
postgres 15467  0.0  0.1   7052  2796 pts/0    S    10:09   0:02 postgres: stats buffer process
postgres 15468  0.0  0.0   6388  1996 pts/0    S    10:09   0:03 postgres: stats collector process
postgres   926  0.0  0.3  90484  7576 pts/0    S    14:34   0:00 postgres: dtr dtr 165.219.88.77(4436) idle
postgres   927  0.0  0.2  89956  4684 pts/0    S    14:34   0:00 postgres: dtr dtr 165.219.88.77(4437) idle
postgres   928  3.0  1.1  90404 23764 pts/0    S    14:34   0:07 postgres: dtr dtr 165.219.88.77(4438) idle
postgres   929  2.7  1.1  90468 23260 pts/0    S    14:34   0:07 postgres: dtr dtr 165.219.88.77(4439) idle
root       935  0.0  0.0   1796   648 pts/2    S+   14:38   0:00 grep postgres
 
I then established an strace session for each connection like this:
 
strace -tt -o strace.926 -p 926
 
Other flags may have been useful, but strace is new to me, so I took
the route I was sure I understood.  I ran until we got an error, which
involved running through 7,278 transactions.  I used Ctrl+C to stop
each strace and searched the results for SIGINT.  There were 1,799
of them.  They always came in a set of lines like this:
 
13:59:19.625498 recv(7, "P\0\0\0Y\0SELECT lcmtr.\"relationName"..., 8192, 0) = 125
13:59:19.625976 _llseek(32, 0, [0], SEEK_END) = 0
13:59:19.626057 _llseek(33, 0, [8192], SEEK_END) = 0
13:59:19.626159 _llseek(32, 0, [0], SEEK_END) = 0
13:59:19.626257 send(7, "1\0\0\0\0042\0\0\0\4T\0\0\0D\0\2relationName\0\0\0"..., 97, 0) = 97
13:59:19.626352 recv(7, 0x82b1000, 8192, 0) = ? ERESTARTSYS (To be restarted)
13:59:19.628477 --- SIGINT (Interrupt) @ 0 (0) ---
13:59:19.628559 sigreturn()             = ? (mask now [])
 
The SELECT statement was easy to find, and it became clear that a
programmer had code which was incorrectly canceling a JDBC
Statement after reaching the end of the (empty) ResultSet.  One
time out of 1,799 this was causing the error we were seeing on
the subsequent commit, which strikes me as a bug.
 
We've already changed the offending code to avoid the invocation
of the Statement.cancel method.  Not that it merits high priority, but
it might make sense for PostgreSQL to behave more consistently on
a commit when a statement within the database transaction has been
canceled.  There currently is a race condition where if the commit
comes fast enough after the Statement.cancel, it receives the error
which is the subject of this thread.
 
-Kevin
 
 
>>> Tom Lane <tgl@sss.pgh.pa.us> 09/13/05 1:18 PM >>>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> I'm having a really hard time coming up with theories about the cause
> or things to check.

Have you tried strace'ing the backend process to see if you can see a
signal being delivered to it?

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: ERROR: canceling query due to user request
  2005-09-13 20:14 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2005-09-13 22:18 ` Tom Lane <tgl@sss.pgh.pa.us>
  2005-09-13 23:00   ` Re: [JDBC] ERROR: canceling query due to user request Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Tom Lane @ 2005-09-13 22:18 UTC (permalink / raw)
  To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: pgsql-admin; pgsql-jdbc@postgresql.org

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> The SELECT statement was easy to find, and it became clear that a
> programmer had code which was incorrectly canceling a JDBC
> Statement after reaching the end of the (empty) ResultSet.  One
> time out of 1,799 this was causing the error we were seeing on
> the subsequent commit, which strikes me as a bug.
 
> We've already changed the offending code to avoid the invocation
> of the Statement.cancel method.  Not that it merits high priority, but
> it might make sense for PostgreSQL to behave more consistently on
> a commit when a statement within the database transaction has been
> canceled.  There currently is a race condition where if the commit
> comes fast enough after the Statement.cancel, it receives the error
> which is the subject of this thread.

Yeah.  The Query Cancel protocol has a potential race condition in it:
the cancel request is not synchronous with respect to your existing
connection (it's actually sent over a different connection).  If you try
to send another command immediately, it's possible that the new command
gets to the backend before the cancel signal does, and then the cancel
zaps your new command instead of the one you intended.

This has been discussed before (try the pgsql-jdbc list archives).
I believe we concluded that an appropriate fix was to not consider the
cancel request "done" until the client sees the separate connection
dropped by the postmaster.  libpq's cancel functions wait for that to
happen, and I thought that JDBC had been fixed as well --- maybe you are
using an old driver version?

Of course, if the internal threading in your app is such that you might
issue another command before the Statement.cancel method finishes, then
it's your own bug.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [JDBC] ERROR: canceling query due to user request
  2005-09-13 20:14 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2005-09-13 22:18 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-09-13 23:00   ` Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 14+ messages in thread

From: Oliver Jowett @ 2005-09-13 23:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-admin; pgsql-jdbc@postgresql.org

Tom Lane wrote:

> This has been discussed before (try the pgsql-jdbc list archives).
> I believe we concluded that an appropriate fix was to not consider the
> cancel request "done" until the client sees the separate connection
> dropped by the postmaster.  libpq's cancel functions wait for that to
> happen, and I thought that JDBC had been fixed as well --- maybe you are
> using an old driver version?

I thought this got done too, but looking at the current JDBC driver code
 I don't see it..

-O



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [JDBC] ERROR: canceling query due to user request
@ 2005-09-15 14:22 Kevin Grittner <Kevin.Grittner@wicourts.gov>
  0 siblings, 0 replies; 14+ messages in thread

From: Kevin Grittner @ 2005-09-15 14:22 UTC (permalink / raw)
  To: oliver@opencloud.com; tgl@sss.pgh.pa.us; +Cc: pgsql-admin; pgsql-jdbc@postgresql.org

One more thought on the topic -- in the particular case where we hit
this, the Statement did not have any requests active on its connection.
If the driver can determine this, it could return from the cancel method
without doing anything.
 
-Kevin
 
 
>>> Oliver Jowett <oliver@opencloud.com> 09/13/05 6:00 PM >>>
Tom Lane wrote:

> This has been discussed before (try the pgsql-jdbc list archives).
> I believe we concluded that an appropriate fix was to not consider the
> cancel request "done" until the client sees the separate connection
> dropped by the postmaster.  libpq's cancel functions wait for that to
> happen, and I thought that JDBC had been fixed as well --- maybe you are
> using an old driver version?

I thought this got done too, but looking at the current JDBC driver code
 I don't see it..

-O




^ permalink  raw  reply  [nested|flat] 14+ messages in thread


end of thread, other threads:[~2005-09-15 14:22 UTC | newest]

Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-18 09:23 ERROR:  canceling query due to user request Iain <iain@mst.co.jp>
2003-12-19 18:11 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
2003-12-24 02:10   ` Re: ERROR: canceling query due to user request Iain <iain@mst.co.jp>
2005-09-12 20:54 ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
2005-09-12 22:39 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
2005-09-13 13:51 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
2005-09-13 14:51 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
2005-09-13 16:31 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
2005-09-13 17:25 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
2005-09-13 18:18 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
2005-09-13 20:14 Re: ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>
2005-09-13 22:18 ` Re: ERROR: canceling query due to user request Tom Lane <tgl@sss.pgh.pa.us>
2005-09-13 23:00   ` Re: [JDBC] ERROR: canceling query due to user request Oliver Jowett <oliver@opencloud.com>
2005-09-15 14:22 Re: [JDBC] ERROR: canceling query due to user request Kevin Grittner <Kevin.Grittner@wicourts.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox