pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: pg_wal_lsn_diff
Date: Sat, 06 Feb 2021 11:57:56 -0500
Message-ID: <190699.1612630676@sss.pgh.pa.us> (raw)
In-Reply-To: <20210206.151125.960423226279810864.t-ishii@sraoss.co.jp>
References: <20210206.151125.960423226279810864.t-ishii@sraoss.co.jp>

Tatsuo Ishii <ishii@sraoss.co.jp> writes:
> 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.

+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





view thread (6+ messages)  latest in thread

Message-ID: <190699.1612630676@sss.pgh.pa.us>
Permalink:  ../190699.1612630676@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/190699.1612630676@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ishii@sraoss.co.jp, pgsql-docs@lists.postgresql.org
  Subject: Re: pg_wal_lsn_diff
  In-Reply-To: <190699.1612630676@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox