pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: maxim.boguk@gmail.com, pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #10123: Weird entries in pg_stat_activity
Date: Thu, 24 Apr 2014 12:37:15 -0400
Message-ID: <474.1398357435@sss.pgh.pa.us> (raw)
In-Reply-To: <20140424104442.GC16111@awork2.anarazel.de>
References: <20140424101827.2714.39486@wrigleys.postgresql.org>
	<CABUevEySW0ZrVbMzygnXGJ=E2UAewZu498bUN3VdjO1vjcd8xQ@mail.gmail.com>
	<20140424104442.GC16111@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Andres Freund <andres@2ndquadrant.com> writes:
> I think there's a pgstat_report_xact_timestamp(0) missing from
> xact.c:PrepareTransaction(). There's no point in reporting a prepared
> xact's starttime in a backend that's not associated with it anymore.

> Maxim, are you using prepared transactions?

Even if he were, that wouldn't explain this report, because the displayed
latest-query would have to have been a PREPARE TRANSACTION, no?

However, regardless of exactly what's going on here, I think you're
probably right that PrepareTransaction ought to do
pgstat_report_xact_timestamp(0) once it exits the transaction state
locally.  The definition of that field is that it's null whenever the
session isn't inside a transaction, and once we do PREPARE, we aren't.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (17+ messages)  latest in thread

Message-ID: <474.1398357435@sss.pgh.pa.us>
Permalink:  ../474.1398357435@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/474.1398357435@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@2ndquadrant.com, magnus@hagander.net
  Subject: Re: BUG #10123: Weird entries in pg_stat_activity
  In-Reply-To: <474.1398357435@sss.pgh.pa.us>

* 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