Re: Unnecessary connection overhead due copy-on-write (mainly openssl)

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unnecessary connection overhead due copy-on-write (mainly openssl)
Date: 2025-06-06 15:41:20
Message-ID: CAOYmi+nsgM0+NExR256QW+5da6VhPdr8TO15Wte=k3R5a6JQ8w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 6, 2025 at 4:56 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> It seems weird to me that openssl spends so much effort tidying up its
> memory allocations just before exiting. We could just skip that.
> Looking through the code of OPENSSL_cleanup(), there might be one or two
> cases of log or trace files that get flushed during cleanup, so it's not
> an absolute no-brainer to skip all the cleanup.

I guess I'd be concerned that a hardware crypto provider might need
good-faith cleanup to work well. I understand they can't rely on
atexit in general, but there would be a big difference between "you
might have to clean up after a crash" and "every single connection
litters the hardware with unused stuff".

But that's pure FUD and guesswork; I have no examples to point to, so
there might not be any providers that need that.

--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-06-06 15:46:03 Re: What's our minimum supported Python version?
Previous Message Nathan Bossart 2025-06-06 15:39:56 Re: pg_dump --with-* options