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
c528c42e
Commit
c528c42e
authored
25 years ago
by
Vadim B. Mikheev
Browse files
Options
Downloads
Patches
Plain Diff
More startup/shutdown log messages.
parent
b1ec184d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/postmaster/postmaster.c
+43
-10
43 additions, 10 deletions
src/backend/postmaster/postmaster.c
with
43 additions
and
10 deletions
src/backend/postmaster/postmaster.c
+
43
−
10
View file @
c528c42e
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.12
2
1999/10/0
6 22:44
:2
5
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.12
3
1999/10/0
8 02:16
:2
2
vadim Exp $
*
* NOTES
*
...
...
@@ -174,6 +174,8 @@ static char *progname = (char *) NULL;
static
char
**
real_argv
;
static
int
real_argc
;
static
time_t
tnow
;
/*
* Default Values
*/
...
...
@@ -1208,6 +1210,9 @@ pmdie(SIGNAL_ARGS)
if
(
Shutdown
>=
SmartShutdown
)
return
;
Shutdown
=
SmartShutdown
;
tnow
=
time
(
NULL
);
fprintf
(
stderr
,
"Smart Shutdown request at %s"
,
ctime
(
&
tnow
));
fflush
(
stderr
);
if
(
DLGetHead
(
BackendList
))
/* let reaper() handle this */
return
;
/*
...
...
@@ -1230,11 +1235,18 @@ pmdie(SIGNAL_ARGS)
*/
if
(
Shutdown
>=
FastShutdown
)
return
;
tnow
=
time
(
NULL
);
fprintf
(
stderr
,
"Fast Shutdown request at %s"
,
ctime
(
&
tnow
));
fflush
(
stderr
);
if
(
DLGetHead
(
BackendList
))
/* let reaper() handle this */
{
Shutdown
=
FastShutdown
;
if
(
!
FatalError
)
{
fprintf
(
stderr
,
"Aborting any active transaction...
\n
"
);
fflush
(
stderr
);
SignalChildren
(
SIGTERM
);
}
return
;
}
if
(
Shutdown
>
NoShutdown
)
...
...
@@ -1261,6 +1273,9 @@ pmdie(SIGNAL_ARGS)
* abort all children with SIGUSR1 and exit without
* attempt to properly shutdown data base system.
*/
tnow
=
time
(
NULL
);
fprintf
(
stderr
,
"Immediate Shutdown request at %s"
,
ctime
(
&
tnow
));
fflush
(
stderr
);
if
(
ShutdownPID
>
0
)
kill
(
ShutdownPID
,
SIGQUIT
);
else
if
(
StartupPID
>
0
)
...
...
@@ -1308,7 +1323,11 @@ reaper(SIGNAL_ARGS)
if
(
pid
!=
ShutdownPID
)
abort
();
if
(
exitstatus
!=
0
)
abort
();
{
fprintf
(
stderr
,
"Shutdown failed - abort
\n
"
);
fflush
(
stderr
);
proc_exit
(
1
);
}
proc_exit
(
0
);
}
if
(
StartupPID
>
0
)
...
...
@@ -1316,7 +1335,11 @@ reaper(SIGNAL_ARGS)
if
(
pid
!=
StartupPID
)
abort
();
if
(
exitstatus
!=
0
)
abort
();
{
fprintf
(
stderr
,
"Startup failed - abort
\n
"
);
fflush
(
stderr
);
proc_exit
(
1
);
}
StartupPID
=
0
;
FatalError
=
false
;
if
(
Shutdown
>
NoShutdown
)
...
...
@@ -1341,9 +1364,11 @@ reaper(SIGNAL_ARGS)
return
;
if
(
StartupPID
>
0
||
ShutdownPID
>
0
)
return
;
if
(
DebugLvl
)
fprintf
(
stderr
,
"%s: CleanupProc: reinitializing shared memory and semaphores
\n
"
,
progname
);
tnow
=
time
(
NULL
);
fprintf
(
stderr
,
"Server processes were terminated at %s"
"Reinitializing shared memory and semaphores
\n
"
,
ctime
(
&
tnow
));
fflush
(
stderr
);
shmem_exit
(
0
);
reset_shared
(
PostPortName
);
StartupPID
=
StartupDataBase
();
...
...
@@ -1410,6 +1435,14 @@ CleanupProc(int pid,
return
;
}
if
(
!
FatalError
)
{
tnow
=
time
(
NULL
);
fprintf
(
stderr
,
"Server process (pid %d) exited with status %d at %s"
"Terminating any active server processes...
\n
"
,
pid
,
exitstatus
,
ctime
(
&
tnow
));
fflush
(
stderr
);
}
FatalError
=
true
;
curr
=
DLGetHead
(
BackendList
);
while
(
curr
)
...
...
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