postgresql/src/backend/access
Tom Lane d19bd29f07 Reset pg_stat_activity.xact_start during PREPARE TRANSACTION.
Once we've completed a PREPARE, our session is not running a transaction,
so its entry in pg_stat_activity should show xact_start as null, rather
than leaving the value as the start time of the now-prepared transaction.

I think possibly this oversight was triggered by faulty extrapolation
from the adjacent comment that says PrepareTransaction should not call
AtEOXact_PgStat, so tweak the wording of that comment.

Noted by Andres Freund while considering bug #10123 from Maxim Boguk,
although this error doesn't seem to explain that report.

Back-patch to all active branches.
2014-04-24 13:29:48 -04:00
..
common Address ccvalid/ccnoinherit in TupleDesc support functions. 2014-03-23 02:13:43 -04:00
gin Fix Gin README. 2014-04-22 22:39:50 +03:00
gist Fix bogus handling of bad strategy number in GIST consistent() functions. 2014-04-14 11:18:47 -04:00
hash Allow use of "z" flag in our printf calls, and use it where appropriate. 2014-01-23 17:18:33 -05:00
heap Update obsolete comments. 2014-04-23 14:41:51 +03:00
index Introduce logical decoding. 2014-03-03 16:32:18 -05:00
nbtree Update obsolete comments. 2014-04-23 14:41:51 +03:00
rmgrdesc Cleanup of new b-tree page deletion code. 2014-04-23 10:19:54 +03:00
spgist Avoid allocations in critical sections. 2014-04-04 13:35:44 +03:00
transam Reset pg_stat_activity.xact_start during PREPARE TRANSACTION. 2014-04-24 13:29:48 -04:00
Makefile Split out rmgr rm_desc functions into their own files 2012-11-28 13:01:15 -03:00