Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
474de350
Commit
474de350
authored
Nov 19, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIx for unix domain sockets, from Goran Thyni.
parent
21261b03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+13
-11
No files found.
src/backend/libpq/pqcomm.c
View file @
474de350
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.2
7 1997/11/17 16:17:14 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.2
8 1997/11/19 17:52:00 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -607,8 +607,6 @@ StreamServerPort(char *hostName, short portName, int *fdP)
pqdebug
(
"%s"
,
PQerrormsg
);
return
(
STATUS_ERROR
);
}
if
(
family
==
AF_UNIX
)
on_exitpg
(
do_unlink
,
(
caddr_t
)
0
);
if
((
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
char
*
)
&
one
,
sizeof
(
one
)))
==
-
1
)
{
...
...
@@ -636,14 +634,17 @@ StreamServerPort(char *hostName, short portName, int *fdP)
err
=
bind
(
fd
,
(
struct
sockaddr
*
)
&
saddr
,
len
);
if
(
err
<
0
)
{
sprintf
(
PQerrormsg
,
"FATAL: StreamServerPort: bind() failed: errno=%d
\n
"
,
errno
);
pqdebug
(
"%s"
,
PQerrormsg
);
strcat
(
PQerrormsg
,
"
\t
Is another postmaster already running on that port?
\n
"
);
strcat
(
PQerrormsg
,
"
\t
If not, wait a few seconds and retry.
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
return
(
STATUS_ERROR
);
sprintf
(
PQerrormsg
,
"FATAL: StreamServerPort: bind() failed: errno=%d
\n
"
,
errno
);
pqdebug
(
"%s"
,
PQerrormsg
);
strcat
(
PQerrormsg
,
"
\t
Is another postmaster already running on that port?
\n
"
);
if
(
family
==
AF_UNIX
)
strcat
(
PQerrormsg
,
"
\t
If not, remove socket node (/tmp/.s.PGSQL.<portnr>)and retry.
\n
"
);
else
strcat
(
PQerrormsg
,
"
\t
If not, wait a few seconds and retry.
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
return
(
STATUS_ERROR
);
}
listen
(
fd
,
SOMAXCONN
);
...
...
@@ -657,6 +658,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
*/
*
fdP
=
fd
;
if
(
family
==
AF_UNIX
)
atexit
(
do_unlink
);
return
(
STATUS_OK
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment