public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: Inaccurate statement about log shipping replication mode
Date: Wed, 27 Aug 2025 14:13:21 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Mon, 2025-08-25 at 09:58 +0200, Laurenz Albe wrote:
> On Thu, 2025-08-21 at 15:20 +0000, PG Doc comments form wrote:
> > Page: https://www.postgresql.org/docs/17/warm-standby.html
> >
> > The documentation page about Log-Shipping Standby Servers after describing
> > that there are file-based log shipping and record-based log shipping
> > (streaming replication) states: "It should be noted that log shipping is
> > asynchronous, i.e., the WAL records are shipped after transaction commit.".
> > This statement is misleading because the same page includes a section about
> > configuring synchronous streaming replication. To avoid confusion, I think
> > it makes sense to specify that record-based log shipping can be configured
> > as either asynchronous or synchronous.
>
> I think that the statement you quote is not only misleading, but wrong.
> WAL can get shipped before the transaction commits. Perhaps the sentence
> had better be
>
> It should be noted that by default, log shipping is asynchronous, i.e.,
> the primary server does not wait until the standby receives the data.
Here is a patch for that.
Yours,
Laurenz Albe
Attachments:
[text/x-patch] v1-0001-Fix-doc-defining-asynchronous-replication.patch (1.5K, 2-v1-0001-Fix-doc-defining-asynchronous-replication.patch)
download | inline diff:
From 97cb9a4e36ac035e1dcc108dd6d36033898ccd36 Mon Sep 17 00:00:00 2001
From: Laurenz Albe <[email protected]>
Date: Wed, 27 Aug 2025 14:10:41 +0200
Subject: [PATCH v1] Fix doc defining asynchronous replication
The statement was factually wrong: WAL records can get shipped
to the standby before the transaction commits. The key point
is that the primary does not wait for the standby.
Author: Laurenz Albe <[email protected]>
Discussion: https://postgr.es/m/[email protected]
---
doc/src/sgml/high-availability.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index b47d8b4106e..334b8a4652a 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -527,8 +527,8 @@ protocol to make nodes agree on a serializable transactional order.
</para>
<para>
- It should be noted that log shipping is asynchronous, i.e., the WAL
- records are shipped after transaction commit. As a result, there is a
+ It should be noted that log shipping is asynchronous, i.e., the primary server does
+ not wait until the standby receives the data. As a result, there is a
window for data loss should the primary server suffer a catastrophic
failure; transactions not yet shipped will be lost. The size of the
data loss window in file-based log shipping can be limited by use of the
--
2.51.0
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Inaccurate statement about log shipping replication mode
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox