summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/html/tutorial-arch.html
blob: d319cbc8c7e4f21b5ecb73ef9608059bac5d2462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>1.2. Architectural Fundamentals</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="tutorial-install.html" title="1.1. Installation" /><link rel="next" href="tutorial-createdb.html" title="1.3. Creating a Database" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">1.2. Architectural Fundamentals</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="tutorial-install.html" title="1.1. Installation">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="tutorial-start.html" title="Chapter 1. Getting Started">Up</a></td><th width="60%" align="center">Chapter 1. Getting Started</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 15.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="tutorial-createdb.html" title="1.3. Creating a Database">Next</a></td></tr></table><hr /></div><div class="sect1" id="TUTORIAL-ARCH"><div class="titlepage"><div><div><h2 class="title" style="clear: both">1.2. Architectural Fundamentals</h2></div></div></div><p>
    Before we proceed, you should understand the basic
    <span class="productname">PostgreSQL</span> system architecture.
    Understanding how the parts of
    <span class="productname">PostgreSQL</span> interact will make this
    chapter somewhat clearer.
   </p><p>
    In database jargon, <span class="productname">PostgreSQL</span> uses a
    client/server model.  A <span class="productname">PostgreSQL</span>
    session consists of the following cooperating processes
    (programs):

    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
       A server process, which manages the database files, accepts
       connections to the database from client applications, and
       performs database actions on behalf of the clients.  The
       database server program is called
       <code class="filename">postgres</code>.
       <a id="id-1.4.3.3.3.3.1.1.2" class="indexterm"></a>
      </p></li><li class="listitem"><p>
       The user's client (frontend) application that wants to perform
       database operations.  Client applications can be very diverse
       in nature:  a client could be a text-oriented tool, a graphical
       application, a web server that accesses the database to
       display web pages, or a specialized database maintenance tool.
       Some client applications are supplied with the
       <span class="productname">PostgreSQL</span> distribution; most are
       developed by users.
      </p></li></ul></div><p>
   </p><p>
    As is typical of client/server applications, the client and the
    server can be on different hosts.  In that case they communicate
    over a TCP/IP network connection.  You should keep this in mind,
    because the files that can be accessed on a client machine might
    not be accessible (or might only be accessible using a different
    file name) on the database server machine.
   </p><p>
    The <span class="productname">PostgreSQL</span> server can handle
    multiple concurrent connections from clients.  To achieve this it
    starts (<span class="quote"><span class="quote">forks</span></span>) a new process for each connection.
    From that point on, the client and the new server process
    communicate without intervention by the original
    <code class="filename">postgres</code> process.  Thus, the
    supervisor server process is always running, waiting for
    client connections, whereas client and associated server processes
    come and go.  (All of this is of course invisible to the user.  We
    only mention it here for completeness.)
   </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tutorial-install.html" title="1.1. Installation">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="tutorial-start.html" title="Chapter 1. Getting Started">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="tutorial-createdb.html" title="1.3. Creating a Database">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.1. Installation </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 15.4 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 1.3. Creating a Database</td></tr></table></div></body></html>