postgresql/src/backend
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
..
access Reset pg_stat_activity.xact_start during PREPARE TRANSACTION. 2014-04-24 13:29:48 -04:00
bootstrap Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:31 -05:00
catalog Allow polymorphic aggregates to have non-polymorphic state data types. 2014-04-23 19:17:41 -04:00
commands Allow polymorphic aggregates to have non-polymorphic state data types. 2014-04-23 19:17:41 -04:00
executor Allow polymorphic aggregates to have non-polymorphic state data types. 2014-04-23 19:17:41 -04:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib Fix typos in comments. 2014-03-17 20:47:28 +09:00
libpq Use AF_UNSPEC not PF_UNSPEC in getaddrinfo calls. 2014-04-16 13:21:20 -04:00
main Allow "-C variable" and "--describe-config" even to root users. 2014-04-04 22:03:35 -04:00
nodes Make security barrier views automatically updatable 2014-04-12 21:04:58 -04:00
optimizer Make security barrier views automatically updatable 2014-04-12 21:04:58 -04:00
parser Allow polymorphic aggregates to have non-polymorphic state data types. 2014-04-23 19:17:41 -04:00
po Translation updates 2013-12-02 00:17:07 -05:00
port check socket creation errors against PGINVALID_SOCKET 2014-04-16 10:45:48 -04:00
postmaster Use AF_UNSPEC not PF_UNSPEC in getaddrinfo calls. 2014-04-16 13:21:20 -04:00
regex Fix memory leak during regular expression execution. 2014-03-19 11:09:24 -04:00
replication Fix a few more misc typos in comments. 2014-04-10 00:53:55 +03:00
rewrite Make security barrier views automatically updatable 2014-04-12 21:04:58 -04:00
snowball Prefer pg_any_to_server/pg_server_to_any over pg_do_encoding_conversion. 2014-02-23 16:59:05 -05:00
storage Try to fix spurious DSM failures on Windows. 2014-04-16 12:04:44 -04:00
tcop Reduce lock levels of some ALTER TABLE cmds 2014-04-06 11:13:43 -04:00
tsearch Avoid memcpy() with same source and destination address. 2014-03-07 13:14:33 +02:00
utils Fix documentation of FmgrInfo.fn_nargs. 2014-04-22 23:22:12 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00