Re: Fix a wrong comment in load_file()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: cca5507 <cca5507(at)qq(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix a wrong comment in load_file()
Date: 2024-12-23 04:10:34
Message-ID: Z2jiug2gnCtDFKDR@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 22, 2024 at 10:50:47PM -0500, Tom Lane wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> Right. This comment is misleading.
>
> I think it was once correct, decades ago. Obviously we missed
> fixing it when we ripped out the unload functionality.

This was recent enough, and easy to miss.

>> - /* Load the shared library */
>> + /* Load the shared library, unless we already did */
>
>> This comment is still true, though.
>
> Seems like an improvement to me?

Fine by me.

While on it, I think that we should adjust all these ones too:
contrib/sepgsql/hooks.c: * Module load/unload callback
contrib/auto_explain/auto_explain.c:/* Saved hook values in case of
unload */
contrib/passwordcheck/passwordcheck.c:/* Saved hook value in case of
unload */
contrib/pg_stat_statements/pg_stat_statements.c:/* Saved hook values
in case of unload */

The saved hooks are not here to readjust the stack based on a reload,
just to make sure that the existing paths loaded are all taken. I
would just remove the "in case of unload" part for the last three, and
"unload" for the first one. Thoughts?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-12-23 04:15:31 Re: Fix a wrong comment in load_file()
Previous Message Michael Paquier 2024-12-23 03:53:33 Re: Memory leak in WAL sender with pgoutput (v10~)