Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsiUq-0004y7-GG for pgsql-general@arkaria.postgresql.org; Thu, 23 Aug 2018 05:49:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fsiUo-0006Yn-I2 for pgsql-general@arkaria.postgresql.org; Thu, 23 Aug 2018 05:49:26 +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.89) (envelope-from ) id 1fsP88-00023L-1Q for pgsql-general@lists.postgresql.org; Wed, 22 Aug 2018 09:08:44 +0000 Received: from sonic302-47.consmr.mail.ir2.yahoo.com ([87.248.110.110]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsP84-0003u7-8S for pgsql-general@postgresql.org; Wed, 22 Aug 2018 09:08:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1534928917; bh=wXRUeeKIlZHkstjxMxTjgGiIXLPAvoStM1RlLUXdAz0=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=pj8ddrD3zjQu4MAMX68Y9yUBFb71YTn1a6ltplJVknA0RqJ632OosbTU7B1658o8idNE4VIavYmJddjzue4fTML/vdpVtBDxkd0FyfbCDkS2n+LQXAhd5sprNLMAICvx9b06KrifjX+8HPKhFXW5fcpoAsYkRv/K7p5BsrFfCWx3eGGw35ZOoHIzBjz8Og9JkaYZvmtPceu3DUb4k26iQl8pQjV7vJSl/VTJQ+MHh2ey8z/NC1XhqKQY7goqVyKOtQjLt0HgO9D3JnTPp98r9PUSnUgUA+fy9B6uhQbHxAm3ed5mnwsS9IeFoBy+y+/fjIOErYxxagzrHXmF+LH35A== X-YMail-OSG: tfO0iPcVM1nDfgT9w5RdBZnPuxbb7f8RUBzf5OJWhhONZPiSCL1Eau3_3hD3Xtq .QpstfSIQwdlxygNdtri33M_ypjpdiZmVPcrI_QcUyXFLkvA_RsSKAmULS_uKpl0qSTosYMB7Jm4 vDUQq6ggJTaUpHCs9uWxr.xiD_9YjHaKrpHrf0K_74rnEc5RiqIfFuCo4280_tHqnq1EJyBH8Xkj Q82ysgp0Z2v.LIwA8i8jXAOiTQudlhUZ.4sEe0IDNcQ778QVIlckPtvgX8v5mWkP5dTxpIporyKF MKUudI2ToaRHqkMl.eUYlv3oWeAjx.MslzKHHBZMqouMVy6fWK.IN.tJUUFztjrw1g_f.hoCT1_e kqNrjSCQlbKq2RV_cXStclwMRtQ_xvLLsDlnHDV_SHzrYIPV8zBo87L_O7csskscEraC2abmtf4a 5Uyk9QmFBomJs9K5Eo.5DXZS_aRN9ClUMtU92oznFVUtDXcRJZExJ8NyxJL6PUlBG2.FYvZg4eg6 MOdLoo9Zz.lDeeuXB_1EGuvktTj.dUiHI3IoJIy6rZq755SpOzfHlRVjnMi6jYgu14AYNrd7KWDo WU8BByue02fORHaHfpS48544yWdxpYqE13GPGkrAQF6k74gaIQfEYh0PWL.G9zgG6cvwi8gajYPh bPVo_sS9sXMY0v92Z3x8yx6iXYgnf4_O9724cbPurHO6WKA_13lXAiLNBjX9InOVVt9aW8u.yyyO PZxrWRqwnNrjxauwdc4rAgMxDCHoTwrlIq6O.zlvFYzTg_rhcmiecCm5oZ6rUof10VgR9VKU3BYQ JECHpo0JIZ7kccF..MNRGrz71fGEptVl0pGC27zd_xZSSefXk39993vOT55F9TzzBHaGXtNuW_D2 KRmZFM5kTZwjJ_tpzkCV9vRHzS8tqXMNYIk8y.LLZe.oPcgSyWO9827Dnmqy0._cy Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ir2.yahoo.com with HTTP; Wed, 22 Aug 2018 09:08:37 +0000 Date: Wed, 22 Aug 2018 09:03:21 +0000 (UTC) From: imp3 Reply-To: imp3 To: "pgsql-general@postgresql.org" Message-ID: <1109096000.1077136.1534928601221@mail.yahoo.com> Subject: Command line session and running queries MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1077135_849011848.1534928601220" References: <1109096000.1077136.1534928601221.ref@mail.yahoo.com> X-Mailer: WebService/1.1.12262 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Content-Length: 2863 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1077135_849011848.1534928601220 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello,I've run an update query inside command line tool (psql) then I've exit the tool (closing the window). When I re-logged in, I've noticed in pg_stat_activity that my query was still running.I used the command pg_cancel_backend with the right PID, but it returned "f" few seconds later.I re-checked pg_stat_activity and I was not able to see my query; there was only an autovacuum running on the table impacted by my query.Since my update query usually takes about one hour, I was wandering what happened. Is postgres regularly checking command line session? If session has expired, would postgres stop the query and rollback it? I'm using both client and server v10.1. Thanks in advance. ------=_Part_1077135_849011848.1534928601220 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,
I've run an upda= te query inside command line tool (psql) then I've exit the tool (closing t= he window).

W= hen I re-logged in, I've noticed in pg_stat_activity that my query was stil= l running.
I used the command pg_cancel_backend with the right PID, but it returned = "f" few seconds later.
I re-checked pg_stat_activity and I was not able to see my qu= ery; there was only an autovacuum running on the table impacted by my query= .
Since m= y update query usually takes about one hour, I was wandering what happened.=

Is postgres = regularly checking command line session? If session has expired, would post= gres stop the query and rollback it?

I'm using both client and server v10.1.

Thanks in advance.

------=_Part_1077135_849011848.1534928601220--