Get wait for LSN status
get_wait_for_lsn_statusReports whether PG 19's WAIT FOR LSN is usable and indicates standby status, returning server version and fallback details.
Instructions
Report whether PG 19's WAIT FOR LSN is usable on this server. Also reports whether the current backend is a standby (the only context where the wait does meaningful work). Never raises. On PG ≤ 18 returns available=false and points at the poll-loop fallback. Returns an object with available (bool), server_version_num (int), server_version, is_in_recovery (bool), and detail.
Example: get_wait_for_lsn_status()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| available | Yes | ||
| is_in_recovery | Yes | ||
| server_version | Yes | ||
| server_version_num | Yes |