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