Re: Proposal: Add backup start time to pg_stat_progress_basebackup - Mailing list pgsql-hackers

From Rob Moore
Subject Re: Proposal: Add backup start time to pg_stat_progress_basebackup
Date
Msg-id CAEGgwttFOGU3xa=ZpomGudZHtkM291TmKw1HLaVYqwZaaJNJfQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Add backup start time to pg_stat_progress_basebackup  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
Thanks David, I've just tried this, and joining to pg_stat_activity on pid works great. I'll do that.

Sorry for the noise 😅,
Rob

On Tue, Jan 20, 2026 at 11:22 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Monday, January 19, 2026, Rob Moore <robmoore121@gmail.com> wrote:

Was backup start time intentionally omitted from pg_stat_progress_basebackup, or would it be okay for me or someone else to add it as a column? Or, am I being daft and there is another obvious way to get the start time for an in-progress base backup?


Not sure about base backup but the other progress reporting commands would get that info from pg_stat_activity.query_start which can be joined to using pid.  backend_start is likely close enough for pg_basebackup if it doesn’t recognize the replication protocol as a “command”.  I haven’t checked.

David J.

 

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: tablecmds: clarify recurse vs recusing
Next
From: jinbinge
Date:
Subject: A minor grammar error was found in a comment in the smgrtruncate function