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

Re: implementing query timeout

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ed Loehr <ed(at)LoehrTech(dot)com>
Cc: dave(at)fastcrypt(dot)com,Matthew Kennedy <mkennedy(at)opushealthcare(dot)com>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: implementing query timeout
Date: 2002-07-10 04:05:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Here is my first draft of a query timeout SET variable.  It works for a
simple test:
	test=> set query_timeout to '2000';
	test=> select * from pg_class, pg_type;
	ERROR:  Query was cancelled.

I still need to polish it up and do more testing.  Can people comment on
the proper placement of the disable_sig_alarm(true) calls?  Also, the
handling of the alarm is tricky because the deadlock timer uses the
alarm as well and the query_timeout.  (I have not gotten all the cases
correct yet.)

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


pgsql-patches by date

Next:From: Brent VernerDate: 2002-07-10 06:12:14
Subject: COPY with column list
Previous:From: Christopher Kings-LynneDate: 2002-07-10 03:03:53
Subject: Re: New Full Text Index using contrib/fulltextindex which now able to processing Traditional Chinese characters(Big5 encoding)

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