agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tim Dudgeon <tdudgeon.ml@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: commit not completing - how to investigate?
Date: Fri, 21 Jul 2017 16:18:49 +0100
Message-ID: <e00cc4cd-05d1-7fd1-a7a0-e7fea6e81919@gmail.com> (raw)
In-Reply-To: <29711.1500646472@sss.pgh.pa.us>
References: <5e59f5e0-7168-fb80-d038-7fe9adad4aa9@gmail.com>
<29711.1500646472@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
Maybe I'm not interpreting it correctly.
I was assuming that if the view reported a row then that row was still
"happening".
Yes, the state is "idle", and the command is "COMMIT".
But if the COMMIT has completed then the process should finish and the
row not be present?
So is what you are suggesting that in my case I'm using a connection
pool, and the COMMIT has completed successfully, the connection released
back to the pool, but not yet closed, so that process is still running?
Tim
On 21/07/2017 15:14, Tom Lane wrote:
> Tim Dudgeon <tdudgeon.ml@gmail.com> writes:
>> I have a situation where the pg_stat_activity view shows that can have
>> some processes that are idle and not completing. In some cases the
>> statement being executed is COMMIT.
> Are you sure you're interpreting the view properly? If the session
> state is shown as idle, it's idle. We used to show the query field
> as empty in that case, but recent PG versions allow the query field
> to continue to show the last-completed command.
>
> regards, tom lane
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
view thread (4+ messages) latest in thread
Message-ID: <e00cc4cd-05d1-7fd1-a7a0-e7fea6e81919@gmail.com>
Permalink: ../e00cc4cd-05d1-7fd1-a7a0-e7fea6e81919@gmail.com/
Also on: postgresql.org/message-id/e00cc4cd-05d1-7fd1-a7a0-e7fea6e81919@gmail.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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tdudgeon.ml@gmail.com
Subject: Re: commit not completing - how to investigate?
In-Reply-To: <e00cc4cd-05d1-7fd1-a7a0-e7fea6e81919@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox