Get wait for LSN status
get_wait_for_lsn_statusCheck whether PostgreSQL 19 WAIT FOR LSN is usable and whether the backend is a standby; get version and recovery status, with poll-loop fallback guidance for older servers.
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()
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_wait_for_lsn_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| available | Yes | ||
| is_in_recovery | Yes | ||
| server_version | Yes | ||
| server_version_num | Yes |