Tatsuo Ishii <is...@sraoss.co.jp> writes: > According to the pg_wal_lsn_diff manual: > pg_wal_lsn_diff ( lsn pg_lsn, lsn pg_lsn ) $B"*(B numeric
> Calculates the difference in bytes between two write-ahead log > locations. This can be used with pg_stat_replication or some of > the functions shown in Table 9.87 to get the replication lag. > It's not clear whether its return value is (first arg - second arg) or > (second arg - first arg). The order matters because the return value > could have a sign (it actually does first arg - second arg). Attached > is a patch to fix the description. +1 for fixing that. Two notes though: first, your text doesn't agree with the prototype ("ls1" should be "lsn1"), and second, I think it would read better if you didn't split the phrase "difference in bytes". That is, - Calculates the difference in bytes between two write-ahead log + Calculates the difference in bytes (lsn1 - lsn2) between two write-ahead log Also maybe you should use the <parameter>lsn1</parameter> markup in the text. regards, tom lane