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
b3ad4985
Commit
b3ad4985
authored
May 21, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report strerror() rather than errno in low-level backend libpq
failure messages.
parent
9a6184de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+12
-9
No files found.
src/backend/libpq/pqcomm.c
View file @
b3ad4985
...
...
@@ -28,7 +28,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.c,v 1.7
0 1999/05/10 16:10:34 momjian
Exp $
* $Id: pqcomm.c,v 1.7
1 1999/05/21 01:25:06 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -196,8 +196,8 @@ StreamServerPort(char *hostName, short portName, int *fdP)
if
((
fd
=
socket
(
family
,
SOCK_STREAM
,
0
))
<
0
)
{
snprintf
(
PQerrormsg
,
ERROR_MSG_LENGTH
,
"FATAL: StreamServerPort: socket() failed: errno=%d
\n
"
,
errno
);
"FATAL: StreamServerPort: socket() failed: %s
\n
"
,
strerror
(
errno
)
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
return
STATUS_ERROR
;
...
...
@@ -211,8 +211,8 @@ StreamServerPort(char *hostName, short portName, int *fdP)
sizeof
(
one
)))
==
-
1
)
{
snprintf
(
PQerrormsg
,
ERROR_MSG_LENGTH
,
"FATAL: StreamServerPort: setsockopt (SO_REUSEADDR) failed: errno=%d
\n
"
,
errno
);
"FATAL: StreamServerPort: setsockopt(SO_REUSEADDR) failed: %s
\n
"
,
strerror
(
errno
)
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
return
STATUS_ERROR
;
...
...
@@ -265,8 +265,8 @@ StreamServerPort(char *hostName, short portName, int *fdP)
if
(
err
<
0
)
{
snprintf
(
PQerrormsg
,
ERROR_MSG_LENGTH
,
"FATAL: StreamServerPort: bind() failed: errno=%d
\n
"
,
errno
);
pqdebug
(
"%s"
,
PQerrormsg
);
"FATAL: StreamServerPort: bind() failed: %s
\n
"
,
strerror
(
errno
)
);
strcat
(
PQerrormsg
,
"
\t
Is another postmaster already running on that port?
\n
"
);
if
(
family
==
AF_UNIX
)
...
...
@@ -281,6 +281,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
strcat
(
PQerrormsg
,
"
\t
If not, wait a few seconds and retry.
\n
"
);
}
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
return
STATUS_ERROR
;
}
...
...
@@ -441,7 +442,8 @@ pq_recvbuf(void)
* if we have a hard communications failure ...
* So just write the message to the postmaster log.
*/
fprintf
(
stderr
,
"pq_recvbuf: recv() failed, errno=%d
\n
"
,
errno
);
fprintf
(
stderr
,
"pq_recvbuf: recv() failed: %s
\n
"
,
strerror
(
errno
));
return
EOF
;
}
if
(
r
==
0
)
...
...
@@ -609,7 +611,8 @@ pq_flush(void)
* tries to write to the client, which would cause a recursive
* flush attempt! So just write it out to the postmaster log.
*/
fprintf
(
stderr
,
"pq_flush: send() failed, errno %d
\n
"
,
errno
);
fprintf
(
stderr
,
"pq_flush: send() failed: %s
\n
"
,
strerror
(
errno
));
/* We drop the buffered data anyway so that processing
* can continue, even though we'll probably quit soon.
*/
...
...
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