Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
Chapter 55. Frontend/Backend Protocol
Prev UpPart VII. InternalsHome Next

Chapter 55. Frontend/Backend Protocol

Table of Contents

55.1. Overview
55.1.1. Messaging Overview
55.1.2. Extended Query Overview
55.1.3. Formats and Format Codes
55.2. Message Flow
55.2.1. Start-up
55.2.2. Simple Query
55.2.3. Extended Query
55.2.4. Pipelining
55.2.5. Function Call
55.2.6. COPY Operations
55.2.7. Asynchronous Operations
55.2.8. Canceling Requests in Progress
55.2.9. Termination
55.2.10.SSL Session Encryption
55.2.11.GSSAPI Session Encryption
55.3. SASL Authentication
55.4. Streaming Replication Protocol
55.5. Logical Streaming Replication Protocol
55.5.1. Logical Streaming Replication Parameters
55.5.2. Logical Replication Protocol Messages
55.5.3. Logical Replication Protocol Message Flow
55.6. Message Data Types
55.7. Message Formats
55.8. Error and Notice Message Fields
55.9. Logical Replication Message Formats
55.10. Summary of Changes since Protocol 2.0

PostgreSQL uses a message-based protocol for communication between frontends and backends (clients and servers). The protocol is supported overTCP/IP and also over Unix-domain sockets. Port number 5432 has been registered with IANA as the customary TCP port number for servers supporting this protocol, but in practice any non-privileged port number can be used.

This document describes version 3.0 of the protocol, implemented inPostgreSQL 7.4 and later. For descriptions of the earlier protocol versions, see previous releases of thePostgreSQL documentation. A single server can support multiple protocol versions. The initial startup-request message tells the server which protocol version the client is attempting to use. If the major version requested by the client is not supported by the server, the connection will be rejected (for example, this would occur if the client requested protocol version 4.0, which does not exist as of this writing). If the minor version requested by the client is not supported by the server (e.g., the client requests version 3.1, but the server supports only 3.0), the server may either reject the connection or may respond with a NegotiateProtocolVersion message containing the highest minor protocol version which it supports. The client may then choose either to continue with the connection using the specified protocol version or to abort the connection.

In order to serve multiple clients efficiently, the server launches a newbackend process for each client. In the current implementation, a new child process is created immediately after an incoming connection is detected. This is transparent to the protocol, however. For purposes of the protocol, the termsbackend andserver are interchangeable; likewisefrontend andclient are interchangeable.


Prev Up Next
54.35. pg_views Home 55.1. Overview
pdfepub
Go to PostgreSQL 16
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp