Received: from smtp011.mail.yahoo.com (smtp011.mail.yahoo.com [216.136.173.31]) by postgresql.org (Postfix) with SMTP id 346D1474E71 for ; Fri, 12 Jul 2002 13:53:37 -0400 (EDT) Received: from psc.progress.com (HELO Yahoo.com) (janwieck@192.233.92.200 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 12 Jul 2002 17:53:37 -0000 Message-ID: <3D2F1798.E65AC418@Yahoo.com> Date: Fri, 12 Jul 2002 13:53:28 -0400 From: Jan Wieck X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.14-6.1.1smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Bruce Momjian Cc: Rudi Starcevic , pgsql-sql@postgresql.org Subject: Re: Query kill References: <200207120501.g6C51Vo14062@candle.pha.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200207/195 X-Sequence-Number: 8574 Bruce Momjian wrote: > > Rudi Starcevic wrote: > > Hello, > > > > If I write a query that is inefficient or in an eternal loop how > > do I stop it without restarting the postmaster ? > > > > I can see many postmaster processed appearing in the output of the 'ps' > > command. > > Do I need to stop/kill them all or can I stop just the query I want ? > > Just send a SIGINT to the process. That simulates a ^C, which works too > from the client like psql. Doesn't the client need a signal handler for that and call PQcancelRequest() in that? Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #