postgresql/src
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
..
backend Reset pg_stat_activity.xact_start during PREPARE TRANSACTION. 2014-04-24 13:29:48 -04:00
bin Allow polymorphic aggregates to have non-polymorphic state data types. 2014-04-23 19:17:41 -04:00
common Un-break peer authentication. 2014-03-28 10:30:37 -04:00
include Fix incorrect pg_proc.proallargtypes entries for two built-in functions. 2014-04-23 21:21:05 -04:00
interfaces ecpg: Add additional files to .gitignore 2014-04-23 13:30:36 -04:00
makefiles Flush a stray definition of $(DLLTOOL). 2014-02-11 12:59:48 -05:00
pl Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
port Preserve errno across free(). 2014-04-04 19:07:37 -04:00
template Revert to using --enable-auto-import in Cygwin builds. 2014-02-16 15:14:04 -05:00
test Fix incorrect pg_proc.proallargtypes entries for two built-in functions. 2014-04-23 21:21:05 -04:00
timezone Update time zone data files to tzdata release 2014a. 2014-03-15 13:36:07 -04:00
tools Properly build pg_recvlogical in the msvc build system 2014-04-24 09:31:29 +02:00
tutorial Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in build: add EXTRA_REGRESS_OPTS to all pg_regress invocations 2014-04-22 18:13:10 -04:00
Makefile.shlib Tweak position of $(DLL_DEFFILE) in shared-library link commands. 2014-02-12 11:22:23 -05:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00