Re: [HACKERS] Process startup infrastructure is a mess - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Process startup infrastructure is a mess
Date
Msg-id CA+TgmobYmvDPdTndbjLB+j+yHdUT0mkibffpuyoJ96Jg=ovrhA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Process startup infrastructure is a mess  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Thu, Sep 14, 2017 at 9:30 PM, Stephen Frost <sfrost@snowman.net> wrote:
> I'm definitely in agreement with Andres on this one.  This isn't
> refactoring of little-to-never changed code, it's refactoring bits of
> the system which are changed with some regularity and looks likely to
> continue to need change as we add more features moving forward, and
> perhaps add greater controls over process startup.

I agree to some extent.

I think this is a mess and that cleaning it up would be better than
not cleaning it up.  I don't view it as a particularly urgent problem,
though, and I'm not sure I see a need to attack it in a monolithic
way.  I think that unifying the error recovery paths in various
processes would actually be more useful than unifying process startup,
but that's not to say unifying process startup wouldn't be nice.

Generally, I think the newer process startup methods are superior to
the older ones.  The new background worker mechanism provides a
flexible way of adding new processes whose exact number doesn't need
to be known in advance without having to tinker with so much code.  In
contrast, adding an auxiliary process is big nuisance.  So if I were
going to attack this problem, I'd try to make the background worker
machinery sufficiently capable that we can do everything that way, and
then gradually move more things over to that mechanism.

However, I honestly probably wouldn't bother with this unless it were
blocking something specific that I wanted to do.  I wouldn't go as far
as Simon did in his reply; I would not favor refusing a good patch
from a highly qualified contributor that makes this all less ugly and
fragile.  On the other hand, I think he's right that we wouldn't
necessarily get a lot of immediate benefit out of it apart from
feeling good about having done it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [HACKERS] Surjective functional indexes
Next
From: Robert Haas
Date:
Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256