Re: straightening out backend process startup

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: straightening out backend process startup
Date: 2021-08-04 20:34:52
Message-ID: CA+TgmoYmK=KoHGgbkLstA077wvGxao4Pvpxk1tDCPjGudt5jcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 2, 2021 at 12:41 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> - AuxiliaryProcessMain() is used for two independent tasks: Start bootstrap /
> checker mode and starting auxiliary processes. In HEAD there's maybe 5 lines
> out 250 that are actually common to both uses.
>
> A related oddity is that we reserve shared memory resources for bootstrap &
> checker aux processes, despite those never existing.
>
> This is addressed in patches 1-7

This all looks pretty mechanical and, I would guess, not very controversial.

> - The order of invocation of InitProcess()/InitAuxiliaryProcess() and
> BaseInit() depends on EXEC_BACKEND. Due to that there often is no single
> place initialization code can be put if it needs any locks.
>
> This is addressed in patches 8-9
>
> - PostgresMain() has code for single user and multi user interleaved, making
> it unnecessarily hard to understand what's going on.
>
> This is addressed in patches 10

This stuff I'd need to study more in order to have an intelligent opinion.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-08-04 20:38:40 Re: A varint implementation for PG?
Previous Message Andres Freund 2021-08-04 19:45:58 Re: A varint implementation for PG?