From: | Junwang Zhao <zhjwpku(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: remove useless comments |
Date: | 2022-08-09 16:24:02 |
Message-ID: | CAEG8a3+iSf6Q3nyN6q1VHsh2uWAHnwxLkJ4k_3LQBnacirrE0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Fair enough, the rephased version of the comments is in the attachment,
please take a look.
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1583,8 +1583,8 @@ getInstallationPaths(const char *argv0)
FreeDir(pdir);
/*
- * XXX is it worth similarly checking the share/ directory? If the lib/
- * directory is there, then share/ probably is too.
+ * It's not worth checking the share/ directory. If the lib/ directory
+ * is there, then share/ probably is too.
*/
}
On Tue, Aug 9, 2022 at 11:50 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Junwang Zhao <zhjwpku(at)gmail(dot)com> writes:
> > The comments considering checking share/ directory was there for
> > almost 13 years, yet nobody ever trying to add the checking, and
> > there seems never any trouble for not checking it, then I think
> > we should remove those comments.
>
> I think that comment is valuable. It shows that checking the
> sibling directories was considered and didn't seem worthwhile.
> Perhaps it should be rephrased in a more positive way (without XXX),
> but merely deleting it is a net negative because future hackers
> would have to reconstruct that reasoning.
>
> BTW, we're working in a 30+-year-old code base, so the mere fact
> that a comment has been there a long time does not make it bad.
>
> regards, tom lane
--
Regards
Junwang Zhao
Attachment | Content-Type | Size |
---|---|---|
0001-comments-rephrase-the-comment-in-a-more-positive-way.patch | application/octet-stream | 1.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2022-08-09 16:34:46 | Re: moving basebackup code to its own directory |
Previous Message | Simon Riggs | 2022-08-09 16:16:33 | Re: SUBTRANS: Minimizing calls to SubTransSetParent() |