You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifies the TCP/IP address(es) on which the server is to listen for new remote direct memory access (<literal>RDMA</literal>) connections via <literal>rsocket</literal> from client applications. The value takes the form of a comma-separated list of host names
647
-
and/or numeric IP addresses. The special entry <literal>*</>
Copy file name to clipboardExpand all lines: doc/src/sgml/installation.sgml
-9Lines changed: 0 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -765,15 +765,6 @@ su - postgres
765
765
</varlistentry>
766
766
767
767
768
-
<varlistentry>
769
-
<term><option>--with-rsocket</option></term>
770
-
<listitem>
771
-
<para>
772
-
Enable <literal>rsocket</literal> API support for remote direct memory access (<acronym>RDMA</acronym>).
773
-
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
Connects to the server using <literal>rsocket</literal> API.
1114
-
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
<para><productname>&productname;</productname> provides support for client/server connections that use remote direct memory access (<acronym>RDMA</acronym>) technology. You must have an <acronym>RDMA</acronym> implementation set up on both client and server systems.</para>
2470
-
<para>With <acronym>RDMA</acronym>, data can be sent directly into the memory of the remote system, bypassing the operating system kernel. As a result, this reduces the CPU load, ensures low network latency in distributed systems, and yields better performance.
<para>For client/server <acronym>RDMA</acronym> connections, <productname>&productname;</productname> uses <application>libpq</application> with <literal>rsocket</literal> API.
2477
-
To enable <acronym>RDMA</acronym> connections for your <productname>&productname;</productname> database via <literal>rsocket</literal>, you must configure both client and server systems, as follows:
2478
-
</para>
2479
-
2480
-
<orderedlist>
2481
-
<listitem>
2482
-
<para>On the server side, add the <xref linkend="listen-rdma-addresses"> GUC variable to the <filename>postgresql.conf</filename> configuration file to specify TCP/IP address(es) on which the server is to listen for new <acronym>RDMA</acronym> connections via <literal>rsocket</literal> from client applications. For example:
2483
-
<programlisting>
2484
-
listen_rdma_addresses = 'server1,172.17.3.21'
2485
-
</programlisting>
2486
-
You can specify a comma-separated list of host names and/or numeric IP addresses. If set to <literal>*</>, this variable will enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal> to all the available IP interfaces.
2487
-
</para>
2488
-
<important>
2489
-
<para>Since all connections use the same port specified in the <varname>port</varname> variable, make sure to specify different IP addresses in <varname>listen_addresses</varname> and <varname>listen_rdma_addresses</varname> to avoid conflicts.
2490
-
</para>
2491
-
</important>
2492
-
</listitem>
2493
-
2494
-
<listitem>
2495
-
<para>
2496
-
On the client side, modify the <application>libpq</application> connection parameters to use <literal>rsocket</literal> API. This can be done in one of the following ways:
2497
-
</para>
2498
-
<itemizedlist>
2499
-
<listitem>
2500
-
<para>Add the following <literal>rsocket</literal> settings to the <application>libpq</application> <link linkend="libpq-pgservice">connection service file</link> <filename>pg_service.conf</filename>:
2501
-
<programlisting>
2502
-
# rsocket configuration
2503
-
[rsocket]
2504
-
host=<replaceable>hostname</>
2505
-
port=5433
2506
-
user=<replaceable>username</>
2507
-
with_rsocket=true
2508
-
</programlisting>
2509
-
When the client is connecting to the server via <application>libpq</application>, the name of the service provided in square brackets in the <filename>pg_service.conf</filename> file must be specified in the <link linkend="LIBPQ-PARAMKEYWORDS"><option>service</option></link> parameter keyword, or in the corresponding <link linkend="libpq-envars"><envar>PGSERVICE</envar></link> environment variable. This approach enables you to dynamically control client/server connection type.
2510
-
</para>
2511
-
</listitem>
2512
-
2513
-
<listitem>
2514
-
<para>Alternatively, you can set the <envar>WITH_RSOCKET</envar> environment variable:
2515
-
<programlisting>
2516
-
export WITH_RSOCKET=true
2517
-
</programlisting>
2518
-
In this case, all the client/server connections will use <literal>rsocket</literal> API.
2519
-
</para>
2520
-
</listitem>
2521
-
</itemizedlist>
2522
-
</listitem>
2523
-
</orderedlist>
2524
-
2525
-
</sect2>
2526
-
2527
-
<sect2>
2528
-
<title>Using <acronym>RDMA</acronym> with <application>pg_dump</application></title>
2529
-
<para>To connect <application>pg_dump</application> to the server over <acronym>RDMA</acronym> via <literal>rsocket</literal>:</para>
2530
-
<orderedlist>
2531
-
<listitem>
2532
-
<para>Set up the server as described in <xref linkend="rdma-setup">.
2533
-
</para>
2534
-
</listitem>
2535
-
<listitem>
2536
-
<para>Set the <envar>WITH_RSOCKET</envar> environment variable:
2537
-
<programlisting>
2538
-
export WITH_RSOCKET=true
2539
-
</programlisting>
2540
-
</para>
2541
-
</listitem>
2542
-
</orderedlist>
2543
-
<para>Once the setup is complete, launch <application>pg_dump</application> as usual. For example:
<title>Using <acronym>RDMA</acronym> for Master-Slave Replication</title>
2553
-
<para>To enable master-slave replication over <acronym>RDMA</acronym> connections via <literal>rsocket</literal>, you need to configure master and slave nodes. For example, to allow client connections to the server 172.17.3.21 from 172.17.3.0/24 addresses on behalf of the <literal>postgres</> user, follow the steps below:</para>
2554
-
2555
-
<para><emphasis role="strong">To set up the master node for replication over <acronym>RDMA</acronym> connections via <literal>rsocket</literal>:</emphasis>
2556
-
</para>
2557
-
<orderedlist>
2558
-
<listitem>
2559
-
<para>Edit the <filename>pg_hba.conf</filename> file to allow client connections and replication from the specified IP addresses:
2560
-
<programlisting>
2561
-
host all postgres 172.17.3.0/24 md5
2562
-
host replication postgres 172.17.3.0/24 md5
2563
-
</programlisting>
2564
-
</para>
2565
-
</listitem>
2566
-
<listitem>
2567
-
<para>
2568
-
Edit the <filename>postgresql.conf</filename> file:
2569
-
<programlisting>
2570
-
listen_rdma_addresses = '172.17.3.21'
2571
-
wal_level = hot_standby
2572
-
hot_standby = on
2573
-
max_wal_senders = 1
2574
-
</programlisting>
2575
-
The <varname>listen_rdma_addresses</varname> variable specifies the TCP/IP address(es) on which the server is to listen for new <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
2576
-
</para>
2577
-
</listitem>
2578
-
<listitem>
2579
-
<para>Restart the master node.
2580
-
</para>
2581
-
</listitem>
2582
-
</orderedlist>
2583
-
2584
-
<tip>
2585
-
<para>If you set <varname>log_connections</varname> and <varname>log_disconnections</varname> GUC variables, the log file will include detailed information on each client connection and disconnection, respectively. For example:
<para>In the <filename>postgresql.conf</filename> file, clear the <varname>listen_rdma_addresses</varname> parameter:
2621
-
<programlisting>
2622
-
listen_rdma_addresses = ''
2623
-
</programlisting>
2624
-
</para>
2625
-
</listitem>
2626
-
</orderedlist>
2627
-
2628
-
<para>Once the setup is complete, start the slave node. The streaming replication is now performed over the <acronym>RDMA</acronym> connections using <literal>rsocket</literal> API.</para>
2629
-
2630
-
</sect2>
2631
-
2632
-
</sect1>
2633
2466
2634
2467
<sect1 id="event-log-registration">
2635
2468
<title>Registering <application>Event Log</> on <systemitem
0 commit comments