Re: Fetching timeline during recovery - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Fetching timeline during recovery
Date
Msg-id 20191211151629.GT6962@tamriel.snowman.net
Whole thread Raw
In response to Re: Fetching timeline during recovery  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Fetching timeline during recovery
List pgsql-hackers
Greetings,

* Michael Paquier (michael@paquier.xyz) wrote:
> I would be actually tempted to do the following: one single SRF
> function, say pg_wal_info which takes a text argument in input with
> the following values: flush, write, insert, receive, replay.  Thinking
> more about it that would be rather neat, and more extensible than the
> rest discussed until now.  See for example PostgresNode::lsn.

I've not followed this discussion very closely but I agree entirely that
it's really nice to have the timeline be able to be queried in a more
timely manner than asking through pg_control_checkpoint() gives you.

I'm not sure about adding a text argument to such a function though, I
would think you'd either have multiple rows if it's an SRF that gives
you the information on each row and allows a user to filter with a WHERE
clause, or do something like what pg_stat_replication has and just have
a bunch of columns.

Given that we've already gone with the "bunch of columns" approach
elsewhere, it seems like that approach would be more consistent.

Thanks,

Stephen

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removesrequired quotes
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removesrequired quotes