not translating backend types for ps and log_line_prefix
Hello,
Pursuant to my comments in [1]/messages/by-id/202512091806.bsugq2l4wz7f@alvherre.pgsql, I attach a patch that restricts the use
of translated process types as indicated in $SUBJECT. This adds a
separate column to the process type list, mostly extracted from Euler's
patch, not marked for translation, and uses it in a couple of places.
I think this is more reasonable. I chose to CC Heikki here because the
business with translating these strings was, as I recall, his doing ...
[1]: /messages/by-id/202512091806.bsugq2l4wz7f@alvherre.pgsql
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"No tengo por qué estar de acuerdo con lo que pienso"
(Carlos Caszeli)
Attachments:
On 10/12/2025 15:45, Álvaro Herrera wrote:
Hello,
Pursuant to my comments in [1], I attach a patch that restricts the use
of translated process types as indicated in $SUBJECT. This adds a
separate column to the process type list, mostly extracted from Euler's
patch, not marked for translation, and uses it in a couple of places.
I think this is more reasonable. I chose to CC Heikki here because the
business with translating these strings was, as I recall, his doing ...[1] /messages/by-id/202512091806.bsugq2l4wz7f@alvherre.pgsql
Hm, I don't think I've changed how they're translated. At least not
intentionally.
+PG_PROCTYPE(B_AUTOVAC_LAUNCHER, "autovacuum", gettext_noop("autovacuum launcher"), AutoVacLauncherMain, true) +PG_PROCTYPE(B_AUTOVAC_WORKER, "autovacuum", gettext_noop("autovacuum worker"), AutoVacWorkerMain, true)
It seems not nice that both have the same name, "autovacuum". Similarly,
I think it's good to have different names for dead-end backends and
regular backends.
No objections to the general idea, although I think the current
descriptions are fairly short already.
- Heikki
On 2025-Dec-10, Heikki Linnakangas wrote:
On 10/12/2025 15:45, Álvaro Herrera wrote:
Hello,
Pursuant to my comments in [1], I attach a patch that restricts the use
of translated process types as indicated in $SUBJECT. This adds a
separate column to the process type list, mostly extracted from Euler's
patch, not marked for translation, and uses it in a couple of places.
I think this is more reasonable. I chose to CC Heikki here because the
business with translating these strings was, as I recall, his doing ...[1] /messages/by-id/202512091806.bsugq2l4wz7f@alvherre.pgsql
Hm, I don't think I've changed how they're translated. At least not
intentionally.
Hmm, maybe I misunderstood how the code was changing in these patches,
but I was thinking of
/messages/by-id/8e710eaa-fcfe-4a0b-ae90-87743083e777@iki.fi
Anyway, I think it's rather strange that %b in log_min_message expands
to these long strings which is why I propose to change it to shorter
ones.
+PG_PROCTYPE(B_AUTOVAC_LAUNCHER, "autovacuum", gettext_noop("autovacuum launcher"), AutoVacLauncherMain, true) +PG_PROCTYPE(B_AUTOVAC_WORKER, "autovacuum", gettext_noop("autovacuum worker"), AutoVacWorkerMain, true)It seems not nice that both have the same name, "autovacuum". Similarly, I
think it's good to have different names for dead-end backends and regular
backends.
True, I was not sure about this either. For context, Euler's patch[2]/messages/by-id/144f0f96-c6d3-4ad6-a236-00200513e2e0@app.fastmail.com was
adding a new column called "category" for use with his new
representation of log_min_messages, and he decided that something like
"autovacuum:DEBUG" should affect both the worker and the launcher. I'm
not sure myself that this is a good idea, because if you want DEBUG for
just one and not the other, the proposed interface doesn't let you do
that.
[2]: /messages/by-id/144f0f96-c6d3-4ad6-a236-00200513e2e0@app.fastmail.com
I'd be okay with instead adding "avlauncher", "avworker", "dead-end",
"standalone", to differentiate all those types. ("av" sounds perhaps
too mysterious, so maybe "autovaclauncher" and "autovacworker" for
those?) Bikeshedding, again, welcome.
No objections to the general idea, although I think the current
descriptions are fairly short already.
True, but names with spaces would be unhelpful for log_min_messages.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Siempre hay que alimentar a los dioses, aunque la tierra esté seca" (Orual)
On Wed, Dec 10, 2025, at 6:41 PM, Álvaro Herrera wrote:
On 2025-Dec-10, Heikki Linnakangas wrote:
+PG_PROCTYPE(B_AUTOVAC_LAUNCHER, "autovacuum", gettext_noop("autovacuum launcher"), AutoVacLauncherMain, true) +PG_PROCTYPE(B_AUTOVAC_WORKER, "autovacuum", gettext_noop("autovacuum worker"), AutoVacWorkerMain, true)It seems not nice that both have the same name, "autovacuum". Similarly, I
think it's good to have different names for dead-end backends and regular
backends.True, I was not sure about this either. For context, Euler's patch[2] was
adding a new column called "category" for use with his new
representation of log_min_messages, and he decided that something like
"autovacuum:DEBUG" should affect both the worker and the launcher. I'm
not sure myself that this is a good idea, because if you want DEBUG for
just one and not the other, the proposed interface doesn't let you do
that.
It is called "category" to group process types. The main motivation is
"backend" that has multiple entries. For "autovacuum", I checked the code and
launcher has just a few messages so I decided to have just one category. That's
certainly not a strong argument.
[2] /messages/by-id/144f0f96-c6d3-4ad6-a236-00200513e2e0@app.fastmail.com
I'd be okay with instead adding "avlauncher", "avworker", "dead-end",
"standalone", to differentiate all those types. ("av" sounds perhaps
too mysterious, so maybe "autovaclauncher" and "autovacworker" for
those?) Bikeshedding, again, welcome.
I'm fine expanding the list. If we carefully choose the names we can certainly
expand it later. For example, the standalone can be a new category in the
future. The same can be applied to autovacuum ("autovacuum" controls the worker
and a new category "autovacumlauncher" controls launcher messages).
--
Euler Taveira
EDB https://www.enterprisedb.com/