1.2 基础架构

在深入学习之前,需要首先理解PostgreSQL基本的系统架构。明白PostgreSQL各部分之间如何交互的,对于搞明白接下来介绍的知识点至关重要。

PostgreSQL是客户端/服务器架构。一个PostgreSQL会话包含以下相关的进程:

  • 服务器进程。管理数据库文件,接受并执行客户端连接请求。数据库服务器进程叫做:postgres。

  • 想要进行数据库操作的客户端程序。客户端程序可以多种多样:可以是一个文本工具,一个图形化程序,一个展示数据库数据的页面,或者一个专用的数据库维护工具。有些客户端程序同PostgreSQL一起发布,但大部分是用户自己开发的。

因为是客户端/服务器架构,所以客户端和服务器可以在不同的主机上,并通过TCP/IP通信。你必须牢记这一点,因为在客户端机器上可以访问的文件,可能并不能在服务器上访问(或者只能以不同的文件名访问)。

PostgreSQL服务器进程可以处理多个客户端的并发连接。它通过为每一个连接“fork”一个新的进程来实现此功能。客户端与fork出来的新进程通信的时候,原postgres进程就不会再干预了。所以,postgres进程是一直在运行的,等待客户端的连接,然后fork出来的进程就随着客户端连接的断开而消逝,随着客户端的连接而新生。(当然,这是对用户透明的,这里的描述是为了用户对于PostgreSQL理解的全面性而做出的努力。)

1.2. Architectural Fundamentals

Before we proceed, you should understand the basic PostgreSQL system architecture. Understanding how the parts of PostgreSQL interact will make this chapter somewhat clearer.

In database jargon, PostgreSQL uses a client/server model. A PostgreSQL session consists of the following cooperating processes (programs):

• 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 postgres.

• 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 PostgreSQL distribution; most are developed by users.

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.

The PostgreSQL server can handle multiple concurrent connections from clients. To achieve this it starts (“forks”) a new process for each connection. From that point on, the client and the new server process communicate without intervention by the original postgres process. Thus, the master 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.)

1.2 Architectural Fundamentals相关推荐

  1. Postgres-XL 10 使用介绍(一)

    ## Preface-前言 ### What is PostgreSQL? ​    PostgreSQL 是一个基于加州大学伯克利分校计算机科学系开发的POSTGRES4.2版本的对象关系型数据库管 ...

  2. [读书笔记]Core Java: Volume I - Fundamentals Chapter 1

    Title: Core Java - Volume I Fundamentals Edition: Eleventh Edition Author: Cay S. Horstmann 文章目录 Pre ...

  3. Blender材质和着色基础视频教程 CGCookie – Fundamentals of Blender Materials and Shading

    Blender材质和着色基础视频教程 CGCookie – Fundamentals of Blender Materials and Shading Blender材质和着色基础视频教程 CGCoo ...

  4. Blender纹理基础学习视频教程 CGCookie – Fundamentals of Texturing in Blender

    Blender纹理基础学习视频教程 CGCookie – Fundamentals of Texturing in Blender Blender纹理基础学习视频教程 CGCookie – Funda ...

  5. Android开发者指南(4) —— Application Fundamentals

    前言 本章内容为开发者指南(Dev Guide)/Framework Topics/Application Fundamentals,版本为Android2.3 r1,翻译转载并整理自译言:" ...

  6. 路由设计技术基础(Fundamentals of routing design technology)

    路由设计技术基础(Fundamentals of routing design technology) UDP(User Datagram Protocol) FUNCTION TCP(Transmi ...

  7. AndroidApplication Fundamentals(Android应用基础)

    AndroidApplication Fundamentals(Android应用基础) Android应用采用Java编程语言来编写,AndroidSDK工具编译我们的代码,连同任何数据和资源文件一 ...

  8. [Android官方API阅读]___Application Fundamentals

    2019独角兽企业重金招聘Python工程师标准>>> 学Android不少时间了,项目做的比较少,虽然没找到Android相关的工作,但我仍然不会放弃对Android继续研究的坚持 ...

  9. 【原创】Windows® Embedded CE 6.0 Fundamentals 读书笔记_Chapter 9

    Chapter 9 第九章主要是介绍关于应用程序开发的一章.这一章比较适合应用层开发的人员来了解如何基于wince6.0开发应用层程序,首先我 们还是先看一些单词 //================ ...

最新文章

  1. 查看MYSQL数据库中所有用户及拥有权限
  2. 转载:Linux查看设置系统时区
  3. 阿里云Elasticsearch 智能化运维实践
  4. 盘点上海AI行业的10岁、20岁和30岁们
  5. Tomcat7调试运行环境搭建与源代码分析入门
  6. uva 10034 Problem A: Freckles
  7. [asp.net]自定义控件(数据绑定)
  8. jQuery 瀑布流插件
  9. java的基本概念:进制、单位、编码、数据类型、变量声明、ASCII码
  10. vue生命周期和vue-resource
  11. Facebook新模型SEER|图像预训练的内卷
  12. dsp和通用计算机的区别,汽车dsp和功放区别
  13. Tomcat 中 GET方式 请求 中文乱码 出现的原因
  14. 如何在word中制作线宽不同的三线表
  15. matlab 非线性常微分方程,Matlab数值求解非线性常微分方程 - 仿真模拟 - 小木虫 - 学术 科研 互动社区...
  16. html代码 小球上下波动,HTML5CSS3特效-上下跳动的小球-遁地龙卷风
  17. 郑莉版java第三章答案_java语言程序设计(郑莉)第七章课后习题答案.docx
  18. 广州白云工商技师学院计算机工程,广州白云工商技师学院面积有多大
  19. 熟悉的时间,坚持就是胜利!
  20. jQuery实现导航栏的样式切换

热门文章

  1. 线性代数系列讲解第八篇投影及AX=b(无解情况)求近似解及最小二乘法
  2. html设置input圆角矩形_html5中关于input用法的改变
  3. 金蝶K3WISE盘点机PDA,移动便携扫描商品条码进行库存查询
  4. 数据库应用系统功能设计与实施
  5. matlab 图片RGB颜色提取(第二版)
  6. SQL server 2012 SP4设置TLS1.2
  7. IEEE1394接口
  8. JSON数据处理之扁平化对象输出
  9. python中字典合并方法
  10. 数控机床联网系统软件