diff --git a/data_source.go b/data_source.go index 97adf40..057ed30 100644 --- a/data_source.go +++ b/data_source.go @@ -229,9 +229,9 @@ FROM log.Fatalln("Error getting pg_current_wal_lsn:", err) } - pgLastWalLsn, err := ds.getPgLastWalReceiveLsn() + pgLastWalLsn, err := ds.getPgLastWalReplayLsn() if err != nil { - log.Fatalln("Error getting pg_last_wal_lsn:", err) + log.Fatalln("Error getting pg_last_wal_replay_lsn:", err) } // Skip the byte lag checks if the last wal lsn is empty if pgLastWalLsn == "" { @@ -304,9 +304,9 @@ func (ds *pgDataSource) getPgCurrentWalLsn(role string) (string, error) { } } -func (ds *pgDataSource) getPgLastWalReceiveLsn() (string, error) { +func (ds *pgDataSource) getPgLastWalReplayLsn() (string, error) { pgLastWalLsn := null.String{} - err := ds.DB.Get(&pgLastWalLsn, "select pg_last_wal_receive_lsn()") + err := ds.DB.Get(&pgLastWalLsn, "select pg_last_wal_replay_lsn()") if err != nil { return "", err } diff --git a/main.go b/main.go index f173b2a..9fa3639 100644 --- a/main.go +++ b/main.go @@ -73,7 +73,7 @@ func main() { flag.Parse() if *versionPtr { - fmt.Println("1.1.2") + fmt.Println("1.2.0") return }