Re: [REVIEW] pg_last_xact_insert_timestamp
Andres Freund <andres@2ndquadrant.com>
From: Andres Freund <andres@2ndquadrant.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Kyotaro HORIGUCHI <horiguchi.kyotaro@oss.ntt.co.jp>,
pgsql-hackers@postgresql.org
Date: 2014-08-11T07:46:23Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Treat 2PC commit/abort the same as regular xacts in recovery.
- e74e0906fad5 9.5.0 cited
Hi, On 2011-10-04 20:52:59 +0900, Fujii Masao wrote: > *** a/src/backend/access/transam/xact.c > --- b/src/backend/access/transam/xact.c > *************** > *** 1066,1071 **** RecordTransactionCommit(void) > --- 1066,1074 ---- > > (void) XLogInsert(RM_XACT_ID, XLOG_XACT_COMMIT_COMPACT, rdata); > } > + > + /* Save timestamp of latest transaction commit record */ > + pgstat_report_xact_end_timestamp(xactStopTimestamp); > } > Perhaps that pgstat_report() should instead be combined with the pgstat_report_xact_timestamp(0) in CommitTransaction()? Then the number of changecount increases and cacheline references would stay the same. The only thing that'd change would be a single additional assignment. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services