From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Consistent coding for the naming of LR workers |
Date: | 2023-06-15 02:42:33 |
Message-ID: | CAHut+Pt1xwATviPGjjtJy5L631SGf3qjV9XUCmxLu16cHamfgg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
There are different types of Logical Replication workers -- e.g.
tablesync workers, apply workers, and parallel apply workers.
The logging and errors often name these worker types, but during a
recent code review, I noticed some inconsistency in the way this is
done:
a) there is a common function get_worker_name() to return the name for
the worker type, -- OR --
b) the worker name is just hardcoded in the message/error
I think it is not ideal to cut/paste the same hardwired strings over
and over. IMO it just introduces an unnecessary risk of subtle naming
differences creeping in.
~~
It is better to have a *single* point where these worker names are
defined, so then all output uses identical LR worker nomenclature.
PSA a small patch to modify the code accordingly. This is not intended
to be a functional change - just a code cleanup.
Thoughts?
------
Kind Regards,
Peter Smith.
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Consistent-naming-of-LR-workers.patch | application/octet-stream | 11.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-06-15 02:43:39 | Re: Bypassing shared_buffers |
Previous Message | Thomas Munro | 2023-06-15 02:28:24 | Re: Bypassing shared_buffers |