Re: contrib/sslinfo cleanup and OpenSSL errorhandling

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: contrib/sslinfo cleanup and OpenSSL errorhandling
Date: 2020-11-03 09:05:59
Message-ID: CABUevEyQQ=zZV8=q11dwRJaH8gEiz6gJBPBY296YL_=AXjwRXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 2, 2020 at 3:19 PM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
> On Fri, Oct 30, 2020 at 11:20 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> >
> > > On 30 Oct 2020, at 00:40, Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > > There's quite a few copies of this code that look exactly the same,
> > > except for the be_tls_get_* call. Do you see a way to have fewer copies
> > > of the same code?
> >
> > There's really only two of the same, and two sets of those. I tried some
> > variations but didn't really achieve anything that would strike the right
> > balance on the codegolf-to-readability scale. Maybe others have a richer
> > imagination than me.
>
> Yeah, since it's only 2 of each, moving it to a macro wouldn't really
> save a lot -- and it would make things less readable overall I think.
>
> So I'd say the current version is OK.
>
> One thing I noted was in the docs part of the patch there is a missing
> comma -- but that one is missing previously as well. I'll go apply
> that fix to the back branches while waiting to see if somebody comes
> up with a more creative way to avoid the repeated code :)

Applied, with the small adjustment of the comma in the docs.

I wonder if we should perhaps backpatch 0002? The changes to sslinfo
that were ported go all the way back to 9.6, so it should be a safe
one I think?

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2020-11-03 09:15:48 Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Previous Message Amit Kapila 2020-11-03 08:59:08 Re: Parallel copy