Re: Add last_commit_lsn to pg_stat_database - Mailing list pgsql-hackers

From Cary Huang
Subject Re: Add last_commit_lsn to pg_stat_database
Date
Msg-id 171235607163.1153.6092218568645834290.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: Add last_commit_lsn to pg_stat_database  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           not tested
Documentation:            not tested

Hello

I think it is convenient to know the last commit LSN of a database for troubleshooting and monitoring purposes similar
tothe "pd_lsn" field in a page header that records the last LSN that modifies this page. I am not sure if it can help
determinethe WAL location to resume / catch up in logical replication as the "confirmed_flush_lsn" and "restart_lsn" in
alogical replication slot are already there to figure out the resume / catchup point as I understand. Anyhow, I had a
lookat the patch, in general it looks good to me. Also ran it against the CI bot, which also turned out fine. Just one
smallcomment though. The patch supports the recording of last commit lsn from 2 phase commit as well, but the test does
notseem to have a test on 2 phase commit. In my opinion, it should test whether the last commit lsn increments when a
preparedtransaction is committed in addition to a regular transaction.
 

thank you
-----------------
Cary Huang
www.highgo.ca

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?
Next
From: Daniel Gustafsson
Date:
Subject: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?