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
0e92f981
Commit
0e92f981
authored
Jun 04, 2007
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On win32, don't use SO_REUSEADDR for TCP sockets.
Per failure on buildfarm member baiji and subsequent discussion.
parent
9539e64b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+12
-1
No files found.
src/backend/libpq/pqcomm.c
View file @
0e92f981
...
...
@@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.19
1 2007/03/03 19:32:54 neilc
Exp $
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.19
2 2007/06/04 11:59:20 mha
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -337,6 +337,16 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
continue
;
}
#ifndef WIN32
/*
* Without the SO_REUSEADDR flag, a new postmaster can't be started right away after
* a stop or crash, giving "address already in use" error on TCP ports.
*
* On win32, however, this behavior only happens if the SO_EXLUSIVEADDRUSE is set.
* With SO_REUSEADDR, win32 allows multiple servers to listen on the same address,
* resulting in unpredictable behavior. With no flags at all, win32 behaves as
* Unix with SO_REUSEADDR.
*/
if
(
!
IS_AF_UNIX
(
addr
->
ai_family
))
{
if
((
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
...
...
@@ -349,6 +359,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
continue
;
}
}
#endif
#ifdef IPV6_V6ONLY
if
(
addr
->
ai_family
==
AF_INET6
)
...
...
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