pg_wal_lsn_diff

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: pg_wal_lsn_diff
Date: 2021-02-06 06:11:25
Message-ID: 20210206.151125.960423226279810864.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

According to the pg_wal_lsn_diff manual:

pg_wal_lsn_diff ( lsn pg_lsn, lsn pg_lsn ) → 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.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

Attachment Content-Type Size
pg_wal_lsn_diff.diff text/x-patch 1.0 KB

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2021-02-06 16:57:56 Re: pg_wal_lsn_diff
Previous Message PG Doc comments form 2021-02-05 20:59:06 The synopsis of "ALTER DEFAULT PRIVILEGES" statement is too difficult to understand