public inbox for [email protected]
help / color / mirror / Atom feedFrom: Antonin Houska <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Sami Imseih <[email protected]>
Cc: [email protected]
Subject: Re: Conflicting updates of command progress
Date: Wed, 23 Apr 2025 12:42:35 +0200
Message-ID: <17871.1745404955@localhost> (raw)
In-Reply-To: <[email protected]>
References: <117147.1744380740@localhost>
<CAA5RZ0s_Hta6PWDwY9Lf-c+14F+C13BK2ax=B6R7bmDNhN6xdQ@mail.gmail.com>
<[email protected]>
Fujii Masao <[email protected]> wrote:
> On 2025/04/15 2:13, Sami Imseih wrote:
> >> While working on [1] I realized that some field of pg_stat_progress_cluste has
> >> weird value.
>
> I ran into the same issue while working on [2], and eventually had to
> withdraw that patch because of it.
Have you considered reporting the progress of each command separately?
I think that can be implemented by moving the progress related fields from
PgBackendStatus into a new structure and by teaching the backend to insert a
new instance of that structure into a shared hash table (dshash.c) whenever a
command that needs progress reporting is being started.
pgstat.c uses such a hash table for various statistics objects, however it's
probably not a good idea to adjust this infrastructure by simply adding a new
object kind (e.g. PGSTAT_KIND_COMMAND). I think that pgstat.c is designed for
frequent updates of backend-local statistics and less frequent flushes
(e.g. at command completion) to the shared memory. That's not suitable for
progress reporting.
> [2] https://commitfest.postgresql.org/patch/5282/
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Conflicting updates of command progress
In-Reply-To: <17871.1745404955@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox