pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: imp3 <impwins@yahoo.it>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Command line session and running queries
Date: Wed, 22 Aug 2018 09:03:21 +0000 (UTC)
Message-ID: <1109096000.1077136.1534928601221@mail.yahoo.com> (raw)
References: <1109096000.1077136.1534928601221.ref@mail.yahoo.com>

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.

view thread (2+ messages)  latest in thread

Message-ID: <1109096000.1077136.1534928601221@mail.yahoo.com>
Permalink:  ../1109096000.1077136.1534928601221@mail.yahoo.com/
Also on:    postgresql.org/message-id/1109096000.1077136.1534928601221@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: impwins@yahoo.it
  Subject: Re: Command line session and running queries
  In-Reply-To: <1109096000.1077136.1534928601221@mail.yahoo.com>
  References: <1109096000.1077136.1534928601221.ref@mail.yahoo.com> <1109096000.1077136.1534928601221@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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