Re: Add 'worker_type' to pg_stat_subscription
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-09-05T21:02:21Z
Lists: pgsql-hackers
Attachments
- v2-0001-Add-worker_type-to-pg_stat_subscription.patch (application/x-patch) patch v2-0001
On Sat, Sep 2, 2023 at 7:41 AM Nathan Bossart <nathandbossart@gmail.com> wrote: Thanks for your interest in this patch. > Is there any reason not to spell out the names? I think that would match > the other system views better (e.g., backend_type in pg_stat_activity). I had thought it might be simpler in case someone wanted to query by type. But your suggestion for consistency is probably better, so I changed to do it that way. The help is also simplified to match the other 'backend_type' you cited. > Also, instead of "tablesync worker", I'd suggest using "synchronization > worker" to match the name used elsewhere in this table. > Changed to "table synchronization worker". > I see that the table refers to "leader apply workers". Would those show up > as parallel apply workers in the view? Can we add another worker type for > those? Internally there are only 3 worker types: A "leader" apply worker is basically the same as a regular apply worker, except it has other parallel apply workers associated with it. I felt that pretending there are 4 types in the view would be confusing. Instead, I just removed the word "leader". Now there are: "apply worker" "parallel apply worker" "table synchronization worker" PSA patch v2. ------ Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
Add worker type to pg_stat_subscription.
- 13aeaf0797e7 17.0 landed
-
Simplify determining logical replication worker types.
- 2a8b40e36819 17.0 cited