]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Document that WAIT FOR may be interrupted by recovery conflicts
authorAlexander Korotkov <akorotkov@postgresql.org>
Mon, 6 Apr 2026 19:42:06 +0000 (22:42 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Mon, 6 Apr 2026 19:47:26 +0000 (22:47 +0300)
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.

Discussion: https://postgr.es/m/CAPpHfds7oSCbZqob7ytT_Lso8fv-NW8LnedUTE4Krde%2B3rkJeA%40mail.gmail.com
Author: Alexander Korotkov <aekorotkov@gmail.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
doc/src/sgml/ref/wait_for.sgml

index df72b3327c845c74f90ee5e8bf81e87fb715c2d0..c30fba6f05ac23abacc8b115af74d625d882a9ac 100644 (file)
@@ -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>