*** a/contrib/pg_upgrade/pg_upgrade.c --- b/contrib/pg_upgrade/pg_upgrade.c *************** *** 423,430 **** copy_clog_xlog_xid(void) /* set the next transaction id and epoch of the new cluster */ prep_status("Setting next transaction ID and epoch for new cluster"); exec_prog(UTILITY_LOG_FILE, NULL, true, ! "\"%s/pg_resetxlog\" -f -x %u \"%s\"", ! new_cluster.bindir, old_cluster.controldata.chkpnt_nxtxid, new_cluster.pgdata); exec_prog(UTILITY_LOG_FILE, NULL, true, "\"%s/pg_resetxlog\" -f -e %u \"%s\"", --- 423,432 ---- /* set the next transaction id and epoch of the new cluster */ prep_status("Setting next transaction ID and epoch for new cluster"); exec_prog(UTILITY_LOG_FILE, NULL, true, ! "\"%s/pg_resetxlog\" -f -x %u -c %u \"%s\"", ! new_cluster.bindir, ! old_cluster.controldata.chkpnt_nxtxid, ! old_cluster.controldata.chkpnt_nxtxid, new_cluster.pgdata); exec_prog(UTILITY_LOG_FILE, NULL, true, "\"%s/pg_resetxlog\" -f -e %u \"%s\"", *** a/contrib/pg_xlogdump/rmgrdesc.c --- b/contrib/pg_xlogdump/rmgrdesc.c *************** *** 10,15 **** --- 10,16 ---- #include "access/brin_xlog.h" #include "access/clog.h" + #include "access/commit_ts.h" #include "access/gin.h" #include "access/gist_private.h" #include "access/hash.h" *** a/doc/src/sgml/config.sgml --- b/doc/src/sgml/config.sgml *************** *** 2673,2678 **** include_dir 'conf.d' --- 2673,2692 ---- + + track_commit_timestamp (bool) + + track_commit_timestamp configuration parameter + + + + Record commit time of transactions. This parameter + can only be set in postgresql.conf file or on the server + command line. The default value is off. + + + + *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml *************** *** 15923,15928 **** SELECT collation for ('foo' COLLATE "de_DE"); --- 15923,15960 ---- For example 10:20:10,14,15 means xmin=10, xmax=20, xip_list=10, 14, 15. + + + The functions shown in + provide information about transactions that have been already committed. + These functions mainly provide information about when the transactions + were committed. They only provide useful data when + configuration option is enabled + and only for transactions that were committed after it was enabled. + + + + Committed transaction information + + + Name Return Type Description + + + + + pg_xact_commit_timestamp(xid) + timestamp with time zone + get commit timestamp of a transaction + + + pg_last_committed_xact() + xid xid, timestamp timestamp with time zone + get transaction Id and commit timestamp of latest transaction commit + + + +
+ *** a/doc/src/sgml/ref/pg_resetxlog.sgml --- b/doc/src/sgml/ref/pg_resetxlog.sgml *************** *** 22,27 **** PostgreSQL documentation --- 22,28 ---- pg_resetxlog + xid oid *************** *** 77,88 **** PostgreSQL documentation ! The ! The