Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZauw-0007e9-D4 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jan 2018 11:21:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZauv-000490-Ta for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jan 2018 11:21:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eZauv-00048o-Kc for pgsql-bugs@lists.postgresql.org; Thu, 11 Jan 2018 11:21:05 +0000 Received: from d.mail.sonic.net ([64.142.111.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eZaur-00073G-QG for pgsql-bugs@lists.postgresql.org; Thu, 11 Jan 2018 11:21:04 +0000 Received: from engels (162-236-13-58.lightspeed.sntcca.sbcglobal.net [162.236.13.58]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id w0BBKvQI007571 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 11 Jan 2018 03:20:57 -0800 Date: Thu, 11 Jan 2018 03:20:56 -0800 From: David Gould To: pgsql-bugs@lists.postgresql.org Cc: sigutis@gmail.com Subject: Re: BUG #15003: pg_terminate_backend does not work Message-ID: <20180111032056.28a184dd@engels> In-Reply-To: <20180111084327.1413.40219@wrigleys.postgresql.org> References: <20180111084327.1413.40219@wrigleys.postgresql.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVZE7mf1Vl3+1bGMJ02u6LmcOIDWyoRqlKotO3Djw+X8mLLBL+oGgPgJ356S58ghp6H2F2JUGS3cy0n/XSK3wt/F X-Sonic-ID: C;iPWYfsH25xGr6E0r9eIpJw== M;vlPDfsH25xGr6E0r9eIpJw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 11 Jan 2018 08:43:27 +0000 PG Bug reporting form wrote: > pg_terminate_backend returns true, but it does not terminates backend. > > query - "select sync_devices_run()" Does the function sync_devices_run() do any sort of IO other than database queries? pg_terminate_backend() can only terminate queries that are running postgresql code, so if the function is making a blocking system call for example, network IO pg_terminate_backend() can't do anything. -dg -- David Gould daveg@sonic.net If simplicity worked, the world would be overrun with insects.