public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: Antonin Houska <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: POC: Carefully exposing information without authentication
Date: Fri, 30 May 2025 21:34:47 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKAnmmJ77jeYZGXPBxb75U52ojNRUoKd6Za-T26xNPCouUeV8g@mail.gmail.com>
References: <CAKAnmm+T-CEDLmRezWfH-7ZEsFfD_kU2KY1TgB288K+wprB_4Q@mail.gmail.com>
<21076.1748617331@localhost>
<CAKAnmmJ77jeYZGXPBxb75U52ojNRUoKd6Za-T26xNPCouUeV8g@mail.gmail.com>
Greg Sabino Mullane <[email protected]> writes:
> Good question. Forking is expensive, and there is also a lot of
> housekeeping associated with it that is simply not needed here. We want
> this to be lightweight, and simple. No need to fork if we are just going to
> do a few strncmp() calls and a send().
send() can block. I think calling it in the postmaster is a
nonstarter. For comparison, we make an effort to not do any
communication with incoming clients until after forking a child
to do the communication. The one exception is if we have to
report fork failure --- but we don't make any strong guarantees
about that report succeeding. (IIRC, we put the port into nonblock
mode and try only once.) That's probably not a behavior you want
to adopt for non-edge-case usages.
Another point is that you'll recall that there's a lot of
interest in switching to a threaded model. The argument that
"fork is too expensive" may not have a long shelf life.
I'm not taking a position on whether $SUBJECT is a good idea
in the first place.
regards, tom lane
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: POC: Carefully exposing information without authentication
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox