Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gurjeet Singh <gurjeet(at)singh(dot)im>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds
Date: 2022-05-26 23:13:00
Message-ID: 2473819.1653606780@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gurjeet Singh <gurjeet(at)singh(dot)im> writes:
> On Thu, May 26, 2022 at 12:16 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> so maybe those comments in libpq-be.h
>> should be moved to their respective functions? In any case, I'm not
>> excited about having three separate comments covering the same point.

> By 3 locations, I suppose you're referring to the definition of
> secure_initialize(), extern declaration of be_tls_init(), and the
> definition of be_tls_init().

No, I was counting the third comment as the one you proposed to add to
secure_initialize's caller. I think it's not a great idea to add such
comments to call sites, as they're very likely to not get maintained
when somebody adjusts the API of the function. (We have a hard enough
time getting people to update the comments directly next to the
function :-(.)

I think what we ought to do here is just move the oddly-placed comments
in libpq-be.h to be adjacent to the function definitions, as attached.
(I just deleted the .h comments for the GSSAPI functions, as they seem
to have adequate comments in their .c file already.)

regards, tom lane

Attachment Content-Type Size
relocate-comments-for-be-tls-functions.patch text/x-diff 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-05-26 23:23:50 Re: pg_upgrade test writes to source directory
Previous Message Tom Lane 2022-05-26 22:19:56 Re: pg_upgrade test writes to source directory