日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

1.2 Architectural Fundamentals

發(fā)布時間:2024/3/24 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 1.2 Architectural Fundamentals 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.2 基礎(chǔ)架構(gòu)

在深入學(xué)習(xí)之前,需要首先理解PostgreSQL基本的系統(tǒng)架構(gòu)。明白PostgreSQL各部分之間如何交互的,對于搞明白接下來介紹的知識點至關(guān)重要。

PostgreSQL是客戶端/服務(wù)器架構(gòu)。一個PostgreSQL會話包含以下相關(guān)的進程:

  • 服務(wù)器進程。管理數(shù)據(jù)庫文件,接受并執(zhí)行客戶端連接請求。數(shù)據(jù)庫服務(wù)器進程叫做:postgres。

  • 想要進行數(shù)據(jù)庫操作的客戶端程序。客戶端程序可以多種多樣:可以是一個文本工具,一個圖形化程序,一個展示數(shù)據(jù)庫數(shù)據(jù)的頁面,或者一個專用的數(shù)據(jù)庫維護工具。有些客戶端程序同PostgreSQL一起發(fā)布,但大部分是用戶自己開發(fā)的。

?因為是客戶端/服務(wù)器架構(gòu),所以客戶端和服務(wù)器可以在不同的主機上,并通過TCP/IP通信。你必須牢記這一點,因為在客戶端機器上可以訪問的文件,可能并不能在服務(wù)器上訪問(或者只能以不同的文件名訪問)。

?PostgreSQL服務(wù)器進程可以處理多個客戶端的并發(fā)連接。它通過為每一個連接“fork”一個新的進程來實現(xiàn)此功能。客戶端與fork出來的新進程通信的時候,原postgres進程就不會再干預(yù)了。所以,postgres進程是一直在運行的,等待客戶端的連接,然后fork出來的進程就隨著客戶端連接的斷開而消逝,隨著客戶端的連接而新生。(當(dāng)然,這是對用戶透明的,這里的描述是為了用戶對于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.)

?

總結(jié)

以上是生活随笔為你收集整理的1.2 Architectural Fundamentals的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。