Re: Background Processes and reporting - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Background Processes and reporting
Date
Msg-id 20160311214053.ordu3rltnnkxjnlb@alap3.anarazel.de
Whole thread Raw
In response to Background Processes and reporting  (Andres Freund <andres@anarazel.de>)
Responses Re: Background Processes and reporting
List pgsql-hackers
Hi,

On 2016-03-11 11:16:32 -0800, Andres Freund wrote:
> It seems rather worthwhile to think about how we can expand the coverage
> of progress tracking to other types of background processes.

WRT the progress reporting patch, I think we should split (as afaics was
discussed in the thread for a while) off the new part of PgBackendStatus
into it's own structure.

That'd not just allow using this from non-backend processes, but would
also have the advantage that the normal PgBackendStatus' changecount
doesn't advance quite so rapidly. E.g. when reporting progress of a
vacuum, the changecount will probably change at quite a rapid rate, but
that's uninteresting for e.g. pg_stat_activity.


> Similarly for the wait event stuff - checkpointer, wal writer,
> background writer are in many cases processes that very often are
> blocked on locks, IO and such.  Thus restricting the facility to
> database connected processes seems like a loss.

I think one way to address this would be to not only report
PgBackendStatus type processes in pg_stat_activity. While that'd
obviously be a compatibility break, I think it'd be an improvement.

Regards,

Andres



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Proposal: BSD Authentication support
Next
From: Pavel Stehule
Date:
Subject: Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.