From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Consistent coding for the naming of LR workers |
Date: | 2023-06-15 07:59:36 |
Message-ID: | CAA4eK1+ccssBfM06J5yquYJFsSutuT3tjwOE4s=3QNj2d-fVJw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 15, 2023 at 8:13 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> 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.
>
+1. I think makes error strings in the code look a bit shorter. I
think it is better to park the patch for the next CF to avoid
forgetting about it.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-06-15 08:00:18 | Re: Support to define custom wait events for extensions |
Previous Message | John Naylor | 2023-06-15 07:45:22 | Re: generate syscache info automatically |