]> begriffs open source - ai-pg/blob - full-docs/html/protocol.html
Include latest toc output
[ai-pg] / full-docs / html / protocol.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!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>Chapter 54. Frontend/Backend Protocol</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="view-pg-wait-events.html" title="53.38. pg_wait_events" /><link rel="next" href="protocol-overview.html" title="54.1. Overview" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 54. Frontend/Backend Protocol</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="view-pg-wait-events.html" title="53.38. pg_wait_events">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="internals.html" title="Part VII. Internals">Up</a></td><th width="60%" align="center">Part VII. Internals</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="protocol-overview.html" title="54.1. Overview">Next</a></td></tr></table><hr /></div><div class="chapter" id="PROTOCOL"><div class="titlepage"><div><div><h2 class="title">Chapter 54. Frontend/Backend Protocol</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="protocol-overview.html">54.1. Overview</a></span></dt><dd><dl><dt><span class="sect2"><a href="protocol-overview.html#PROTOCOL-MESSAGE-CONCEPTS">54.1.1. Messaging Overview</a></span></dt><dt><span class="sect2"><a href="protocol-overview.html#PROTOCOL-QUERY-CONCEPTS">54.1.2. Extended Query Overview</a></span></dt><dt><span class="sect2"><a href="protocol-overview.html#PROTOCOL-FORMAT-CODES">54.1.3. Formats and Format Codes</a></span></dt><dt><span class="sect2"><a href="protocol-overview.html#PROTOCOL-VERSIONS">54.1.4. Protocol Versions</a></span></dt></dl></dd><dt><span class="sect1"><a href="protocol-flow.html">54.2. Message Flow</a></span></dt><dd><dl><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-START-UP">54.2.1. Start-up</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-SIMPLE-QUERY">54.2.2. Simple Query</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY">54.2.3. Extended Query</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-PIPELINING">54.2.4. Pipelining</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-FUNCTION-CALL">54.2.5. Function Call</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-COPY">54.2.6. COPY Operations</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-ASYNC">54.2.7. Asynchronous Operations</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-CANCELING-REQUESTS">54.2.8. Canceling Requests in Progress</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-TERMINATION">54.2.9. Termination</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-SSL">54.2.10. <acronym class="acronym">SSL</acronym> Session Encryption</a></span></dt><dt><span class="sect2"><a href="protocol-flow.html#PROTOCOL-FLOW-GSSAPI">54.2.11. <acronym class="acronym">GSSAPI</acronym> Session Encryption</a></span></dt></dl></dd><dt><span class="sect1"><a href="sasl-authentication.html">54.3. SASL Authentication</a></span></dt><dd><dl><dt><span class="sect2"><a href="sasl-authentication.html#SASL-SCRAM-SHA-256">54.3.1. SCRAM-SHA-256 Authentication</a></span></dt><dt><span class="sect2"><a href="sasl-authentication.html#SASL-OAUTHBEARER">54.3.2. OAUTHBEARER Authentication</a></span></dt></dl></dd><dt><span class="sect1"><a href="protocol-replication.html">54.4. Streaming Replication Protocol</a></span></dt><dt><span class="sect1"><a href="protocol-logical-replication.html">54.5. Logical Streaming Replication Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="protocol-logical-replication.html#PROTOCOL-LOGICAL-REPLICATION-PARAMS">54.5.1. Logical Streaming Replication Parameters</a></span></dt><dt><span class="sect2"><a href="protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES">54.5.2. Logical Replication Protocol Messages</a></span></dt><dt><span class="sect2"><a href="protocol-logical-replication.html#PROTOCOL-LOGICAL-MESSAGES-FLOW">54.5.3. Logical Replication Protocol Message Flow</a></span></dt></dl></dd><dt><span class="sect1"><a href="protocol-message-types.html">54.6. Message Data Types</a></span></dt><dt><span class="sect1"><a href="protocol-message-formats.html">54.7. Message Formats</a></span></dt><dt><span class="sect1"><a href="protocol-error-fields.html">54.8. Error and Notice Message Fields</a></span></dt><dt><span class="sect1"><a href="protocol-logicalrep-message-formats.html">54.9. Logical Replication Message Formats</a></span></dt><dt><span class="sect1"><a href="protocol-changes.html">54.10. Summary of Changes since Protocol 2.0</a></span></dt></dl></div><a id="id-1.10.6.2" class="indexterm"></a><p>
3   <span class="productname">PostgreSQL</span> uses a message-based protocol
4   for communication between frontends and backends (clients and servers).
5   The protocol is supported over <acronym class="acronym">TCP/IP</acronym> and also over
6   Unix-domain sockets.  Port number 5432 has been registered with IANA as
7   the customary TCP port number for servers supporting this protocol, but
8   in practice any non-privileged port number can be used.
9  </p><p>
10   This document describes version 3.2 of the protocol, introduced in
11   <span class="productname">PostgreSQL</span> version 18. The server and the libpq
12   client library are backwards compatible with protocol version 3.0,
13   implemented in <span class="productname">PostgreSQL</span> 7.4 and later.
14  </p><p>
15    In order to serve multiple clients efficiently, the server launches
16    a new <span class="quote">“<span class="quote">backend</span>”</span> process for each client.
17    In the current implementation, a new child
18    process is created immediately after an incoming connection is detected.
19    This is transparent to the protocol, however.  For purposes of the
20    protocol, the terms <span class="quote">“<span class="quote">backend</span>”</span> and <span class="quote">“<span class="quote">server</span>”</span> are
21    interchangeable; likewise <span class="quote">“<span class="quote">frontend</span>”</span> and <span class="quote">“<span class="quote">client</span>”</span>
22    are interchangeable.
23   </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="view-pg-wait-events.html" title="53.38. pg_wait_events">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="internals.html" title="Part VII. Internals">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="protocol-overview.html" title="54.1. Overview">Next</a></td></tr><tr><td width="40%" align="left" valign="top">53.38. <code class="structname">pg_wait_events</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 54.1. Overview</td></tr></table></div></body></html>