Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m42eP-0004La-3P for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jul 2021 14:47:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m42eO-0001x7-2T for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jul 2021 14:47:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m42eN-0001wt-Ms for pgsql-hackers@lists.postgresql.org; Thu, 15 Jul 2021 14:47:43 +0000 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m42eK-0000Wn-Qs for pgsql-hackers@lists.postgresql.org; Thu, 15 Jul 2021 14:47:42 +0000 Received: by mail-il1-x136.google.com with SMTP id a7so5214679iln.6 for ; Thu, 15 Jul 2021 07:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f8GVPgFlrK1c9RPIwNfA1DaBHZJ56lYi4+o+1q2jRiU=; b=eK/wJrCGW26Gmm9aWJiHXGLV9XEukLyp7KevKIRaRj+YMFNqwgryicBElWQjjexHXI 8bzCU2HftxVPL0PYhEL075Sepr9tRiQ698ziW5xLX7ZwZBNWY/K2oDmc4ot42GxNHutk +GjeT4kJfpMmu8TUfMSYH2RNRi0I5HRGBGYBaUi6AoNFl56MuEV8w6u5fq8vS2vOpQCF gsspB2Qbu0LOmfy/n3BJpEA77MBQGYlcgrf7UOvK0W9OTd/g0+egRiDW0jCMwBGBI4ah ofBPi/egoAN2g2qrLePa3covq9cLFGHrm5eEmConD0XcJdQ50KfHsnqw1ibrJ6S9djm2 LZgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f8GVPgFlrK1c9RPIwNfA1DaBHZJ56lYi4+o+1q2jRiU=; b=XRpiGep1RTbFz+4QAle/1NHAdAun0J+NFRm7m9SIAY1ePzNdLNIRW5hPxwNZk4WZr2 h4wJMM6Dv4MN5BWgM67ZBGN64W2NCet1baNNwGnqClRGKtHyVw7T/34pUYCU/dc/bL27 XBWCOGaOmKvcM/OCQ92CEtPpgoZ6nild6z2DOq2hv+dKjaY8IwraYyWOIfprBNQZAB4k Nr6G948tpqO8YEzo1U/m7lXZpWoDiCdc5wdF7BobvqXp1se7b+h2EQLiVmtkmE5pOORO gb6XycSRwPCe3Usgo3VO9uki3X8wqPevwx5MMeZKctcnj/g19GEY2VJUTqElUPN7d+ZL i8iA== X-Gm-Message-State: AOAM5315jFyNKxKzi9ngXOfyVcyWg9cVkp5BixVojj8xjKPszUOvcZAG 0RpDnzJLeVZx4ekmelB8k9EjrA== X-Google-Smtp-Source: ABdhPJzHSzAmELkCHb4FEqKz0oGHNjaCDveCwJXy9SKXyXZyXvOovbXcPN2rlCf+cuha3wbFE05LMw== X-Received: by 2002:a05:6e02:b24:: with SMTP id e4mr2878024ilu.41.1626360459714; Thu, 15 Jul 2021 07:47:39 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id p21sm3431317iog.37.2021.07.15.07.47.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jul 2021 07:47:39 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 001EF800B38; Thu, 15 Jul 2021 09:47:37 -0500 (CDT) Date: Thu, 15 Jul 2021 09:47:37 -0500 From: Justin Pryzby To: Bharath Rupireddy Cc: pgsql-hackers@lists.postgresql.org, Alvaro Herrera Subject: Re: What are exactly bootstrap processes, auxiliary processes, standalone backends, normal backends(user sessions)? Message-ID: <20210715144737.GG20208@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jul 09, 2021 at 09:24:19PM +0530, Bharath Rupireddy wrote: > I've always had a hard time distinguishing various types of > processes/terms used in postgres. I look at the source code every time > to understand them, yet I don't feel satisfied with my understanding. > I request any hacker (having a better idea than me) to help me with > what each different process does and how they are different from each > other? Of course, I'm clear with normal backends (user sessions), bg > workers, but the others need a bit more understanding. It sounds like something that should be in the glossary, which currently refers to but doesn't define "auxiliary processes". * Background writer, checkpointer, WAL writer and archiver run during normal * operation. Startup process and WAL receiver also consume 2 slots, but WAL * writer is launched only after startup has exited, so we only need 5 slots. */ #define NUM_AUXILIARY_PROCS 5 Bootstrap is run by initdb: src/bin/initdb/initdb.c: "\"%s\" --boot -x0 %s %s " Standalone backend is run by --single, right ? -- Justin