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 1l1VHg-0004hJ-0F for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 14:13:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1VHe-0002es-TJ for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 14:13:30 +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 1l1VHe-0002el-EM for pgsql-hackers@lists.postgresql.org; Mon, 18 Jan 2021 14:13:30 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1VHb-0007pw-8r for pgsql-hackers@lists.postgresql.org; Mon, 18 Jan 2021 14:13:29 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54faa4-119.dhcp.inet.fi [84.250.164.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id DF99A20689; Mon, 18 Jan 2021 16:13:22 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1610979203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cv+E9/VdVs2lhUV6gKz0cQQZoOjnYuFsGqFwvK79JQI=; b=t510Pv5ekAB0RPmhFoKzB4JhKzUlYzGIJNCrGaHhu0M4vEMAHt4rCW49YR/UfKwlvmN9aV i/CHQM0BjsE9Al1n2nVCs1zlCzYDKLV5DI61WJpFCuNEi8RnZ/4oIKEB0qWf6gREl8GkaO FJ+/JcJwu/9PKa5s/DlOXZWYh3Dxbsc= Subject: Re: Additional Chapter for Tutorial - arch-dev.sgml To: Erik Rijkers , =?UTF-8?Q?J=c3=bcrgen_Purtz?= Cc: "David G. Johnston" , PostgreSQL Hackers , Justin Pryzby References: <13c65997-9502-7671-1a7b-50e5d5093514@purtz.de> <93fd8e15-8639-23c8-c7c4-d4cfca323189@purtz.de> <32c7ebc0-f69f-8a77-c397-8fcb9139d8d3@purtz.de> <779bb812-5238-f78b-2782-b1d990f952e3@purtz.de> <7a081d6c-e288-615c-f32c-839fb27366ed@purtz.de> <759f7a615736d8066b3441571d371c68@xs4all.nl> <99f58c4752e9984ffe38a4343fed3837@xs4all.nl> <1bfb1ae4-6f5b-bff4-15a8-a768e0ddd450@purtz.de> From: Heikki Linnakangas Message-ID: Date: Mon, 18 Jan 2021 16:13:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------28F45D019EBB9A9D3573B8B5" Content-Language: en-US ARC-Seal: i=1; s=meesny; d=iki.fi; t=1610979203; a=rsa-sha256; cv=none; b=cKD+HeUBKlsNBL9XLKnC+41Hbfndr+Fr825dkk7FRwQVhSZ2l1GNkM6BroXIRcx24Vrj59 IO1qEPlOHokAJ1d9gtArD7T+pZ9keJ6NsKp0WtFQSmr0gOjikaLxRmuvhqjuKyeqLpRCi+ q1NFWShvUCUQe4XkiRiGGZ64I18mg0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1610979203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cv+E9/VdVs2lhUV6gKz0cQQZoOjnYuFsGqFwvK79JQI=; b=VH45f4HyB/mMl5cPVbXk6RIUmSbJiBodr3WnopUzaknrOcntt+pM8WitM7WZvvljyTKmj+ ufwyaV/rb31ad1yMYKkgC+ln7LVAofU2S08HwLxHc/E2PQ4YZ6WnJ9/jOHWp/9BN2VJn90 k51tHP+ImQuyw3fPmBluCa6JcN1s/18= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------28F45D019EBB9A9D3573B8B5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 20/11/2020 23:52, Erik Rijkers wrote: > (smallish) Changes to arch-dev.sgml This looks good to me. One little complaint: > @@ -125,7 +122,7 @@ > use a supervisor process (also > master process) that spawns a new > server process every time a connection is requested. This supervisor > - process is called postgres and listens at a > + process is called postgres (formerly 'postmaster') and listens at a > specified TCP/IP port for incoming connections. Whenever a request > for a connection is detected the postgres > process spawns a new server process. The server tasks I believe we still call it the postmaster process. We renamed the binary a long time ago (commit 5266f221a2), and the above text was changed as part of that commit. I think that was a mistake, and this should say simply: ... This supervisor process is called postmaster and ... like it did before we renamed the binary. Barring objections, I'll commit this with that change (as attached). - Heikki --------------28F45D019EBB9A9D3573B8B5 Content-Type: text/x-patch; charset=UTF-8; name="arch-dev.sgml.20210118-heikki.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="arch-dev.sgml.20210118-heikki.diff" diff --git a/doc/src/sgml/arch-dev.sgml b/doc/src/sgml/arch-dev.sgml index ade0ad97d8..a27c8477c2 100644 --- a/doc/src/sgml/arch-dev.sgml +++ b/doc/src/sgml/arch-dev.sgml @@ -7,7 +7,7 @@ Author This chapter originated as part of - , Stefan Simkovics' + Stefan Simkovics' Master's Thesis prepared at Vienna University of Technology under the direction of O.Univ.Prof.Dr. Georg Gottlob and Univ.Ass. Mag. Katrin Seyr. @@ -17,10 +17,7 @@ This chapter gives an overview of the internal structure of the backend of PostgreSQL. After having read the following sections you should have an idea of how a query - is processed. This chapter does not aim to provide a detailed - description of the internal operation of - PostgreSQL, as such a document would be - very extensive. Rather, this chapter is intended to help the reader + is processed. This chapter is intended to help the reader understand the general sequence of operations that occur within the backend from the point at which a query is received, to the point at which the results are returned to the client. @@ -30,8 +27,8 @@ The Path of a Query - Here we give a short overview of the stages a query has to pass in - order to obtain a result. + Here we give a short overview of the stages a query has to pass + to obtain a result. @@ -125,9 +122,9 @@ use a supervisor process (also master process) that spawns a new server process every time a connection is requested. This supervisor - process is called postgres and listens at a + process is called postmaster and listens at a specified TCP/IP port for incoming connections. Whenever a request - for a connection is detected the postgres + for a connection is detected the postmaster process spawns a new server process. The server tasks communicate with each other using semaphores and shared memory to ensure data integrity @@ -230,7 +227,7 @@ A detailed description of bison or the grammar rules given in gram.y would be - beyond the scope of this paper. There are many books and + beyond the scope of this manual. There are many books and documents dealing with flex and bison. You should be familiar with bison before you start to study the @@ -343,8 +340,8 @@ In some situations, examining each possible way in which a query - can be executed would take an excessive amount of time and memory - space. In particular, this occurs when executing queries + can be executed would take an excessive amount of time and memory. + In particular, this occurs when executing queries involving large numbers of join operations. In order to determine a reasonable (not necessarily optimal) query plan in a reasonable amount of time, PostgreSQL uses a Genetic @@ -411,7 +408,7 @@ merge join: Each relation is sorted on the join attributes before the join starts. Then the two relations are scanned in parallel, and matching rows are combined to form - join rows. This kind of join is more + join rows. This kind of join is attractive because each relation has to be scanned only once. The required sorting might be achieved either by an explicit sort step, or by scanning the relation in the proper order using an @@ -442,7 +439,7 @@ If the query uses fewer than relations, a near-exhaustive search is conducted to find the best join sequence. The planner preferentially considers joins between any - two relations for which there exist a corresponding join clause in the + two relations for which there exists a corresponding join clause in the WHERE qualification (i.e., for which a restriction like where rel1.attr1=rel2.attr2 exists). Join pairs with no join clause are considered only when there --------------28F45D019EBB9A9D3573B8B5--