Re: pg_stat_replication write_lsn documentation ambiguity?

From: Rui DeSousa <rui(at)crazybean(dot)net>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_stat_replication write_lsn documentation ambiguity?
Date: 2025-03-26 16:49:17
Message-ID: E3BAC71E-A92E-48C6-BA0D-11E6853BE80B@crazybean.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Mar 26, 2025, at 12:35 PM, Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:
>
>
> https://www.postgresql.org/docs/14/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-VIEW <https://www.postgresql.org/docs/14/monitoring-stats.html#MONITORING-PG-STAT-REPLICATION-VIEW>
>
> write_lsn pg_lsn
> Last write-ahead log location written to disk by this standby server
> flush_lsn pg_lsn
> Last write-ahead log location flushed to disk by this standby server
>
> They both say "to disk". Should the write_lsn description be changed to "to the OS"?
>
> --
> Death to <Redacted>, and butter sauce.
> Don't boil me, I'm still alive.
> <Redacted> lobster!

It is understandable to me, especially in the context of write vs flush. Maybe to ‘to the WAL file” if ‘to disk’ is not clear.

From write() man page:

The write() system call attempts to write nbytes of data to the object
referenced by the descriptor fd

From sync() man page:

The sync() system call forces a write of dirty (modified) buffers in the
block buffer cache out to disk.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mauricio Fernandez 2025-03-26 20:58:29 Few extensions, pg_stat_statements not available
Previous Message Ron Johnson 2025-03-26 16:35:02 pg_stat_replication write_lsn documentation ambiguity?