Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
a3382de9
Commit
a3382de9
authored
17 years ago
by
Peter Eisentraut
Browse files
Options
Downloads
Patches
Plain Diff
Provide a more accurate, detailed log message when the archive command fails.
parent
8db9ba18
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/postmaster/pgarch.c
+29
-5
29 additions, 5 deletions
src/backend/postmaster/pgarch.c
with
29 additions
and
5 deletions
src/backend/postmaster/pgarch.c
+
29
−
5
View file @
a3382de9
...
...
@@ -19,7 +19,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.3
3
2007/1
1/24 21:37:04 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.3
4
2007/1
2/12 09:39:54 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -484,11 +484,35 @@ pgarch_archiveXlog(char *xlog)
* Per the Single Unix Spec, shells report exit status > 128 when a
* called command died on a signal.
*/
bool
signa
le
d
=
WIFSIGNALED
(
rc
)
||
WEXITSTATUS
(
rc
)
>
128
;
int
le
v
=
(
WIFSIGNALED
(
rc
)
||
WEXITSTATUS
(
rc
)
>
128
)
?
FATAL
:
LOG
;
ereport
(
signaled
?
FATAL
:
LOG
,
(
errmsg
(
"archive command
\"
%s
\"
failed: return code %d"
,
xlogarchcmd
,
rc
)));
if
(
WIFEXITED
(
rc
))
{
ereport
(
lev
,
(
errmsg
(
"archive command failed with exit code %d"
,
WEXITSTATUS
(
rc
)),
errdetail
(
"The failed archive command was: %s"
,
xlogarchcmd
)));
}
else
if
(
WIFSIGNALED
(
rc
))
{
ereport
(
lev
,
(
#if defined(WIN32)
errmsg
(
"archive command was terminated by exception 0x%X"
,
WTERMSIG
(
rc
)),
errhint
(
"See C include file
\"
ntstatus.h
\"
for a description of the hexadecimal value."
),
#elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST
errmsg
(
"archive command was terminated by signal %d: %s"
,
WTERMSIG
(
rc
),
WTERMSIG
(
rc
)
<
NSIG
?
sys_siglist
[
WTERMSIG
(
rc
)]
:
"(unknown)"
),
#else
errmsg
(
"archive command was terminated by signal %d"
,
WTERMSIG
(
exitstatus
)),
#endif
errdetail
(
"The failed archive command was: %s"
,
xlogarchcmd
)));
}
else
{
ereport
(
lev
,
(
errmsg
(
"archive command exited with unrecognized status %d"
,
rc
),
errdetail
(
"The failed archive command was: %s"
,
xlogarchcmd
)));
}
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment