Hi James, Thanks for the updated patch. I don't have a clear opinion on the feature and whether this is the way to implement it, but I have two simple questions.
1) Do we really need to modify RecordTransactionCommitPrepared and XactLogCommitRecord to return the LSN of the commit record? Can't we just use XactLastRecEnd? It's good enough for advancing replorigin_session_origin_lsn, why wouldn't it be good enough for this? 2) Earlier in this thread it was claimed the function returning the last_commit_lsn is STABLE, but I have to admit it's not clear to me why that's the case :-( All the pg_stat_get_db_* functions are marked as stable, so I guess it's thanks to the pgstat system ... regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company