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
b3a5e76e
Commit
b3a5e76e
authored
Apr 02, 2015
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After a crash, don't restart workers with BGW_NEVER_RESTART.
Amit Khandekar
parent
abd94bca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/backend/postmaster/bgworker.c
src/backend/postmaster/bgworker.c
+11
-4
No files found.
src/backend/postmaster/bgworker.c
View file @
b3a5e76e
...
@@ -419,9 +419,9 @@ BackgroundWorkerStopNotifications(pid_t pid)
...
@@ -419,9 +419,9 @@ BackgroundWorkerStopNotifications(pid_t pid)
/*
/*
* Reset background worker crash state.
* Reset background worker crash state.
*
*
* We assume that, after a crash-and-restart cycle, background workers
should
* We assume that, after a crash-and-restart cycle, background workers
without
*
be restarted immediately, instead of waiting for bgw_restart_time to
*
the never-restart flag should be restarted immediately, instead of waiting
* elapse.
*
for bgw_restart_time to
elapse.
*/
*/
void
void
ResetBackgroundWorkerCrashTimes
(
void
)
ResetBackgroundWorkerCrashTimes
(
void
)
...
@@ -433,7 +433,14 @@ ResetBackgroundWorkerCrashTimes(void)
...
@@ -433,7 +433,14 @@ ResetBackgroundWorkerCrashTimes(void)
RegisteredBgWorker
*
rw
;
RegisteredBgWorker
*
rw
;
rw
=
slist_container
(
RegisteredBgWorker
,
rw_lnode
,
iter
.
cur
);
rw
=
slist_container
(
RegisteredBgWorker
,
rw_lnode
,
iter
.
cur
);
rw
->
rw_crashed_at
=
0
;
/*
* For workers that should not be restarted, we don't want to lose
* the information that they have crashed; otherwise, they would be
* restarted, which is wrong.
*/
if
(
rw
->
rw_worker
.
bgw_restart_time
!=
BGW_NEVER_RESTART
)
rw
->
rw_crashed_at
=
0
;
}
}
}
}
...
...
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