v3-0003-Document-that-WAIT-FOR-may-be-interrupted-by-reco.patch

application/octet-stream

Filename: v3-0003-Document-that-WAIT-FOR-may-be-interrupted-by-reco.patch
Type: application/octet-stream
Part: 1
Message: Re: Implement waiting for wal lsn replay: reloaded

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v3-0003
Subject: Document that WAIT FOR may be interrupted by recovery conflicts
File+
doc/src/sgml/ref/wait_for.sgml 10 0
From c6b13967bfec491b9743ab55bb44aec4915714ab Mon Sep 17 00:00:00 2001
From: Alexander Korotkov <akorotkov@postgresql.org>
Date: Sun, 5 Apr 2026 15:17:04 +0300
Subject: [PATCH v3 3/3] Document that WAIT FOR may be interrupted by recovery
 conflicts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add a note to the WAIT FOR documentation explaining that sessions
using this command on a standby server may be interrupted by recovery
conflicts.  Some conflicts are unavoidable — for example, replaying
a tablespace drop terminates all backends unconditionally.
---
 doc/src/sgml/ref/wait_for.sgml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/wait_for.sgml b/doc/src/sgml/ref/wait_for.sgml
index df72b3327c8..c30fba6f05a 100644
--- a/doc/src/sgml/ref/wait_for.sgml
+++ b/doc/src/sgml/ref/wait_for.sgml
@@ -253,6 +253,16 @@ WAIT FOR LSN '<replaceable class="parameter">lsn</replaceable>'
    timeline.
   </para>
 
+  <para>
+   On a standby server, <command>WAIT FOR</command> sessions may be
+   interrupted by recovery conflicts.  Some recovery conflicts are
+   unavoidable: for example, replaying a tablespace drop resolves
+   conflicts by terminating all backends, regardless of what they are
+   doing.  Applications using <command>WAIT FOR</command> on a standby
+   should be prepared to handle such interruptions, for example by
+   retrying the command or falling back to an alternative mechanism.
+  </para>
+
 </refsect1>
 
  <refsect1>
-- 
2.39.5 (Apple Git-154)