バージョンごとのドキュメント一覧

第54章 フロントエンド/バックエンドプロトコル

目次

54.1. 概要
54.1.1. メッセージ処理の概要
54.1.2. 拡張問い合わせの概要
54.1.3. 書式と書式コード
54.1.4. Protocol Versions
54.2. メッセージの流れ
54.2.1. 開始
54.2.2. 簡易問い合わせ
54.2.3. 拡張問い合わせ
54.2.4. パイプライン化
54.2.5. 関数呼び出し
54.2.6. COPY操作
54.2.7. 非同期操作
54.2.8. 処理中のリクエストの取り消し
54.2.9. 終了
54.2.10. SSLセッション暗号化
54.2.11. GSSAPIセッション暗号化
54.3. SASL認証
54.3.1. SCRAM-SHA-256 認証
54.3.2. OAUTHBEARER Authentication
54.4. ストリーミングレプリケーションプロトコル
54.5. 論理ストリーミングレプリケーションのプロトコル
54.5.1. 論理ストリーミングレプリケーションのパラメータ
54.5.2. 論理レプリケーションのプロトコルのメッセージ
54.5.3. 論理レプリケーションのプロトコルのメッセージフロー
54.6. メッセージのデータ型
54.7. メッセージの書式
54.8. エラーおよび警報メッセージフィールド
54.9. 論理レプリケーションのメッセージ書式
54.10. プロトコル2.0からの変更点の要約
<title>Frontend/Backend Protocol</title>

<productname>PostgreSQL</productname> uses a message-based protocol for communication between frontends and backends (clients and servers). The protocol is supported over <acronym>TCP/IP</acronym> 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. PostgreSQLはフロントエンドとバックエンド(クライアントとサーバ)の通信にメッセージベースのプロトコルを使用します。 このプロトコルはTCP/IPに加え、Unixドメインソケットをサポートします。 ポート番号5432は、このプロトコルをサポートするサーバ用のTCPポートとしてIANAに登録されています。 しかし、実際には任意の非特権ポート番号を使用することができます。

This document describes version 3.2 of the protocol, introduced in <productname>PostgreSQL</productname> version 18. The server and the libpq client library are backwards compatible with protocol version 3.0, implemented in <productname>PostgreSQL</productname> 7.4 and later. 《機械翻訳》このドキュメントは、PostgreSQLバージョン18で導入されたプロトコルのバージョン3.2を記述しています。 サーバおよびlibpqクライアントライブラリは、PostgreSQL7.4以降で実装されたプロトコルバージョン3.0と下位互換性があります。

In order to serve multiple clients efficiently, the server launches a new <quote>backend</quote> 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 terms <quote>backend</quote> and <quote>server</quote> are interchangeable; likewise <quote>frontend</quote> and <quote>client</quote> are interchangeable. 複数のクライアントにサービスを効率的に提供するために、サーバは各クライアント毎に新規のバックエンドプロセスを起動します。 現在の実装では、サーバに接続が届いたことを検知すると即座に新しい子プロセスが生成されます。 しかし、これはプロトコルに対して透過的です。 プロトコルという意味では、バックエンドサーバという用語は相互交換可能です。 同様にフロントエンドクライアントも相互交換可能です。