WAITLSN — wait when target LSN been replayed
WAITLSN'LSN'[ ,delay]
The WAITLSN wait till target LSN will
be replayed with an optional “delay” (milliseconds by default
infinity) to be wait for LSN to replayed.
WAITLSN provides a simple
interprocess LSN wait mechanism for a backends on slave
in master-slave replication scheme on Postgres Pro Enterprise database.
LSNTarget log sequence number to be wait for.
delayTime to wait for LSN to be replayed, in milliseconds.
Delay time to waiting for LSN to be replayed must be integer. For default it is infinity. Waiting can be interrupted using Ctl+C, or by Postmaster death.
Configure and execute a waitlsn from psql:
WAITLSN '0/3F07A6B1', 10000; NOTICE: LSN is not reached. Try to make bigger delay. WAITLSN WAITLSN '0/3F07A611'; WAITLSN WAITLSN '0/3F0FF791', 500000; ^CCancel request sent NOTICE: LSN is not reached. Try to make bigger delay. ERROR: canceling statement due to user request
There is no WAITLSN statement in the SQL
standard.