Sample Header Ad - 728x90

Wal position to wal archive number

0 votes
2 answers
231 views
I want to manage the copy of archiving to remote location. For that I want to delete all the archives I copied unless they are required by the standby. So, for running pg_archivecleanup $ARCLOC $CHECKPOINT I need to find the most recent checkpoint which is ok to delete. I don't look on the recent .backup files as it is too old for my archive capacity. What I do want to look on is the replay_location \ replay_lsn(depend on the version) from pg_stat_replication. However, I do not know how to convert from replay_location value to checkpoint value. I.e. from something like 7/2DBCED18 to 000000020000000700000029. **Answer:** Function is: pg_xlogfile_name
Asked by Nir (529 rep)
Jul 1, 2018, 12:00 PM
Last activity: Sep 26, 2022, 08:17 AM