Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2e7f99d

Browse files
author
Liudmila Mantrova
committed
DOC: fixed rdma documentation for PGPROEE10
1 parent 17d517b commit 2e7f99d

File tree

3 files changed

+28
-49
lines changed

3 files changed

+28
-49
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,7 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn);
330330
socket underlying the database connection.
331331
Loop thus: If <function>PQconnectPoll(conn)</function> last returned
332332
<symbol>PGRES_POLLING_READING</symbol>, wait until the socket is ready to
333-
read (as indicated by <function>PQselect()</> or
334-
<function>PQselectExtended()</>).
333+
read (as indicated by <function>PQselect()</>).
335334
Then call <function>PQconnectPoll(conn)</function> again.
336335
Conversely, if <function>PQconnectPoll(conn)</function> last returned
337336
<symbol>PGRES_POLLING_WRITING</symbol>, wait until the socket is ready
@@ -1959,26 +1958,6 @@ int PQselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, str
19591958
</listitem>
19601959
</varlistentry>
19611960

1962-
<varlistentry id="libpq-pqselectextended">
1963-
<term><function>PQselectExtended</function><indexterm><primary>PQselectExtended</></></term>
1964-
<listitem>
1965-
<para>
1966-
Uses select(2) or poll(2) to wait for input. The <literal>timeout</>
1967-
argument specifies the number of milliseconds that
1968-
<function>PQselectExtended</> should block waiting for a file descriptor
1969-
of the connection to become ready. Specifying a negative value
1970-
in <literal>timeout</> means an infinite timeout. Specifying a
1971-
<literal>timeout</> of zero causes <function>poll()</> to return
1972-
immediately.
1973-
1974-
<synopsis>
1975-
int PQselectExtended(const PGconn *conn, int timeout_ms);
1976-
</synopsis>
1977-
1978-
</para>
1979-
</listitem>
1980-
</varlistentry>
1981-
19821961
<varlistentry id="libpq-pqbackendpid">
19831962
<term><function>PQbackendPID</function><indexterm><primary>PQbackendPID</></></term>
19841963
<listitem>
@@ -2044,6 +2023,21 @@ int PQconnectionUsedPassword(const PGconn *conn);
20442023
</para>
20452024
</listitem>
20462025
</varlistentry>
2026+
2027+
<varlistentry id="libpq-pqisrsocket">
2028+
<term><function>PQisRsocket</function><indexterm><primary>PQisRsocket</></></term>
2029+
<listitem>
2030+
<para>
2031+
Returns true (1) if the connection uses <literal>rsocket</literal> API
2032+
and false (0) otherwise.
2033+
2034+
<synopsis>
2035+
int PQisRsocket(const PGconn *conn);
2036+
</synopsis>
2037+
2038+
</para>
2039+
</listitem>
2040+
</varlistentry>
20472041
</variablelist>
20482042
</para>
20492043

@@ -4634,7 +4628,7 @@ int PQisBusy(PGconn *conn);
46344628

46354629
<para>
46364630
A typical application using these functions will have a main loop that
4637-
uses <function>PQselect()</function> or <function>PQselectExtended()</> to wait for
4631+
uses <function>PQselect()</function> to wait for
46384632
all the conditions that it must respond to. One of the conditions
46394633
will be input available from the server, which in terms of
46404634
<function>PQselect()</function> means readable data on the file
@@ -5184,8 +5178,7 @@ typedef struct pgNotify
51845178
useful commands to execute is to call
51855179
<function>PQconsumeInput</function>, then check
51865180
<function>PQnotifies</function>. You can use
5187-
<function>PQselect()</function> or <function>PQselectExtended()</function>
5188-
to wait for data to arrive from the
5181+
<function>PQselect()</function> to wait for data to arrive from the
51895182
server, thereby using no <acronym>CPU</acronym> power unless there is
51905183
something to do. (See <function>PQsocket</function> to obtain the file
51915184
descriptor number to use with <function>PQselect()</function>.) Note that
@@ -8433,6 +8426,10 @@ main(int argc, char **argv)
84338426
#include <errno.h>
84348427
#include <sys/time.h>
84358428
#include <sys/types.h>
8429+
#ifdef HAVE_SYS_SELECT_H
8430+
#include <sys/select.h>
8431+
#endif
8432+
84368433
#include "libpq-fe.h"
84378434

84388435
static void
@@ -8495,21 +8492,23 @@ main(int argc, char **argv)
84958492
{
84968493
/*
84978494
* Sleep until something happens on the connection. We use
8498-
* PQselectExtended to wait for input.
8495+
* PQselect to wait for input.
84998496
*/
85008497
int sock;
8498+
fd_set input_mask;
85018499

85028500
sock = PQsocket(conn);
85038501

85048502
if (sock < 0)
8505-
break; /* shouldn't happen */
8503+
break; /* shouldn't happen */
85068504

85078505
FD_ZERO(&input_mask);
85088506
FD_SET(sock, &input_mask);
85098507

8510-
if (PQselectExtended(conn, -1) < 0)
8508+
if (PQselect(sock + 1, &input_mask, NULL, NULL, NULL,
8509+
PQisRsocket(conn)) < 0)
85118510
{
8512-
fprintf(stderr, "PQselectExtended() failed: %s\n", strerror(errno));
8511+
fprintf(stderr, "PQselect() failed: %s\n", strerror(errno));
85138512
exit_nicely(conn);
85148513
}
85158514

doc/src/sgml/ref/pg_basebackup.sgml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,6 @@ doc/src/sgml/ref/pg_basebackup.sgml
553553
</listitem>
554554
</varlistentry>
555555

556-
<varlistentry>
557-
<term><option>--with-rsocket</option></term>
558-
<listitem>
559-
<para>
560-
Connects to the server using <literal>rsocket</literal> API.
561-
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
562-
</para>
563-
</listitem>
564-
</varlistentry>
565-
566556
<varlistentry>
567557
<term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
568558
<term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>

doc/src/sgml/ref/pgbench.sgml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,6 @@ pgbench <optional> <replaceable>options</> </optional> <replaceable>dbname</>
732732
</listitem>
733733
</varlistentry>
734734

735-
<varlistentry>
736-
<term><option>--with-rsocket</option></term>
737-
<listitem>
738-
<para>
739-
Connect to the server using <literal>rsocket</literal> API.
740-
You must also set the <xref linkend="listen-rdma-addresses"> variable for your server to enable <acronym>RDMA</acronym> connections via <literal>rsocket</literal>.
741-
</para>
742-
</listitem>
743-
</varlistentry>
744-
745735
<varlistentry>
746736
<term><option>-U</option> <replaceable>login</></term>
747737
<term><option>--username=</option><replaceable>login</></term>

0 commit comments

Comments
 (0)