Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb280a71

Browse files
committed
1 parentceda17d commitb280a71

34 files changed

+364
-636
lines changed

‎configure

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5305,8 +5305,6 @@ fi
53055305
#
53065306
# Replace socket with rsocket
53075307
#
5308-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with rsocket support" >&5
5309-
$as_echo_n "checking whether to build with rsocket support... " >&6; }
53105308

53115309

53125310

@@ -5333,9 +5331,10 @@ else
53335331
fi
53345332

53355333

5336-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_rsocket" >&5
5337-
$as_echo "$with_rsocket" >&6; }
53385334

5335+
if test "$with_rsocket" = yes ; then
5336+
LIBS="$LIBS -lrdmacm"
5337+
fi
53395338

53405339
#
53415340
# Include directories
@@ -12825,6 +12824,17 @@ fi
1282512824

1282612825
done
1282712826

12827+
fi
12828+
12829+
if test "$with_rsocket" = yes; then
12830+
ac_fn_c_check_header_mongrel "$LINENO" "rdma/rsocket.h" "ac_cv_header_rdma_rsocket_h" "$ac_includes_default"
12831+
if test "x$ac_cv_header_rdma_rsocket_h" = xyes; then :
12832+
12833+
else
12834+
as_fn_error $? "header file <rdma/rsocket.h> is required for RDMA API" "$LINENO" 5
12835+
fi
12836+
12837+
1282812838
fi
1282912839

1283012840
if test "$with_zlib" = yes; then

‎configure.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,13 @@ PGAC_ARG_BOOL(enable, cassert, no, [enable assertion checks (for debugging)],
577577
#
578578
# Replace socket with rsocket
579579
#
580-
AC_MSG_CHECKING([whether to build with rsocket support])
581580
PGAC_ARG_BOOL(with, rsocket, no, [replace socket with rsocket (RDMA socket API)],
582581
[AC_DEFINE([WITH_RSOCKET], 1,
583582
[Define to 1 to build with rsocket instead socket. (--with-rsocket)])])
584-
AC_MSG_RESULT([$with_rsocket])
583+
584+
if test "$with_rsocket" = yes ; then
585+
LIBS="$LIBS -lrdmacm"
586+
fi
585587

586588
#
587589
# Include directories
@@ -1387,6 +1389,10 @@ Use --without-readline to disable libedit support.])])])])
13871389
[AC_CHECK_HEADERS(readline/history.h)])])
13881390
fi
13891391

1392+
if test "$with_rsocket" = yes; then
1393+
AC_CHECK_HEADER(rdma/rsocket.h, [], [AC_MSG_ERROR([header file <rdma/rsocket.h> is required for RDMA API])])
1394+
fi
1395+
13901396
if test "$with_zlib" = yes; then
13911397
AC_CHECK_HEADER(zlib.h, [], [AC_MSG_ERROR([zlib header not found
13921398
If you have zlib already installed, see config.log for details on the

‎contrib/postgres_fdw/connection.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,10 @@ pgfdw_get_result(PGconn *conn, const char *query)
495495
/* Sleep until there's something to do */
496496
wc=WaitLatchOrSocket(MyLatch,
497497
WL_LATCH_SET |WL_SOCKET_READABLE,
498-
PQsocket(conn),PQisRsocket(conn),
498+
PQsocket(conn),
499+
#ifdefWITH_RSOCKET
500+
PQisRsocket(conn),
501+
#endif
499502
-1L);
500503
ResetLatch(MyLatch);
501504

‎src/backend/libpq/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include $(top_builddir)/src/Makefile.global
1515
# be-fsstubs is here for historical reasons, probably belongs elsewhere
1616

1717
OBJS = be-fsstubs.o be-secure.o auth.o crypt.o hba.o ip.o md5.o pqcomm.o\
18-
pqformat.o pqmq.o pqsignal.o auth-scram.o
18+
pqformat.o pqmq.o pqsignal.o auth-scram.o
1919

2020
ifeq ($(with_openssl),yes)
2121
OBJS += be-secure-openssl.o

‎src/backend/libpq/auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ auth_peer(hbaPort *port)
18341834
gid_tgid;
18351835
structpasswd*pw;
18361836

1837-
if (getpeereid(port->sock->fd,&uid,&gid)!=0)
1837+
if (getpeereid(port->sock,&uid,&gid)!=0)
18381838
{
18391839
/* Provide special error message if getpeereid is a stub */
18401840
if (errno==ENOSYS)

‎src/backend/libpq/be-secure-openssl.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,11 @@ be_tls_open_server(Port *port)
423423
else
424424
waitfor=WL_SOCKET_WRITEABLE;
425425

426-
WaitLatchOrSocket(MyLatch,waitfor,
427-
port->sock->fd,port->sock->isRsocket,0);
426+
WaitLatchOrSocket(MyLatch,waitfor,port->sock,
427+
#ifdefWITH_RSOCKET
428+
port->isRsocket,
429+
#endif
430+
0);
428431
gotoaloop;
429432
caseSSL_ERROR_SYSCALL:
430433
if (r<0)

‎src/backend/libpq/be-secure.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ secure_raw_read(Port *port, void *ptr, size_t len)
208208
#ifdefWIN32
209209
pgwin32_noblock= true;
210210
#endif
211-
n=pg_recv(port->sock,ptr,len,0);
211+
n=pg_recv(port->sock,ptr,len,0,port->isRsocket);
212212
#ifdefWIN32
213213
pgwin32_noblock= false;
214214
#endif
@@ -289,7 +289,7 @@ secure_raw_write(Port *port, const void *ptr, size_t len)
289289
#ifdefWIN32
290290
pgwin32_noblock= true;
291291
#endif
292-
n=pg_send(port->sock,ptr,len,0);
292+
n=pg_send(port->sock,ptr,len,0,port->isRsocket);
293293
#ifdefWIN32
294294
pgwin32_noblock= false;
295295
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp