Command line session and running queries

From: imp3 <impwins(at)yahoo(dot)it>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Command line session and running queries
Date: 2018-08-22 09:03:21
Message-ID: 1109096000.1077136.1534928601221@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Durumdara 2018-08-22 12:26:08 Hungarian collation in English Windows server
Previous Message Laurenz Albe 2018-08-22 06:42:52 Re: Linker errors while creating a PostgreSQL C extension function.