From: Alexander Korotkov Date: Mon, 6 Apr 2026 19:42:06 +0000 (+0300) Subject: Document that WAIT FOR may be interrupted by recovery conflicts X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10484c2cc75be3746933d2052b18e8c28512f69e;p=thirdparty%2Fpostgresql.git Document that WAIT FOR may be interrupted by recovery conflicts 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 Reviewed-by: Xuneng Zhou --- 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 'lsn' timeline. + + On a standby server, WAIT FOR 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 WAIT FOR on a standby + should be prepared to handle such interruptions, for example by + retrying the command or falling back to an alternative mechanism. + +