Skip to content

feat(engine): show continuous PGDATA synchronization details in API+CLI (#314)

Denis O requested to merge 314-sync-status into master

Description

Include changes:

  • Added logic to query lag, lsn, uptime from PostgreSQL instance
  • Update /status endpoint to return synchronization status

Related issue

Closes #314 (closed)

Examples

{
    "status": {
        "code": "OK",
        "message": "Instance is ready"
    },
    "engine": {
        "version": "v3.2.0-rc.0-47-g981b91f-20220902-1154",
        "edition": "",
        "startedAt": "2022-09-02T11:56:46Z",
        "telemetry": false
    },
    ...
    "synchronization": {
        "status": {
            "code": "OK",
            "message": ""
        },
        "startedAt": "2022-09-02T11:57:04.714205272Z",
        "lastReplayedLsn": "1AB/D9000000",
        "lastReplayedLsnAt": "2022-08-27T10:17:08.641496Z",
        "replicationLag": "524416e0",
        "replicationUptime": 20
    }
}

Checklist

  • MR description has been reviewed
  • MR changes are functionally tested
  • MR does NOT have text changes OR there are text changes and they have been reviewed
  • MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed
  • MR does NOT have UI changes OR there are UI changes and they have been reviewed
Edited by Artyom Kartasov

Merge request reports