fix(pageserver): add the walreceiver state to tenant timeline GET api endpoint (#5196)

Add a `walreceiver_state` field to `TimelineInfo` (response of `GET /v1/tenant/:tenant_id/timeline/:timeline_id`) and while doing that, refactor out a common `Timeline::walreceiver_state(..)`. No OpenAPI changes, because this is an internal debugging addition.

Fixes #3115.

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
This commit is contained in:
duguorong009
2023-09-07 19:17:18 +08:00
committed by GitHub
parent 7ba0f5c08d
commit 706977fb77
4 changed files with 18 additions and 10 deletions

View File

@@ -381,6 +381,8 @@ pub struct TimelineInfo {
pub pg_version: u32,
pub state: TimelineState,
pub walreceiver_status: String,
}
#[derive(Debug, Clone, Serialize)]