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
eee6cf1f
Commit
eee6cf1f
authored
May 07, 2014
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When a bgworker exits, always call ReleasePostmasterChildSlot.
Commit
e2ce9aa2
was insufficiently well thought out. Repair.
parent
970d1f76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+12
-10
No files found.
src/backend/postmaster/postmaster.c
View file @
eee6cf1f
...
...
@@ -2856,23 +2856,25 @@ CleanupBackgroundWorker(int pid,
* backend, any exit status other than 0 or 1 is considered a crash
* and causes a system-wide restart.
*/
if
(
rw
->
rw_worker
.
bgw_flags
&
BGWORKER_SHMEM_ACCESS
)
if
(
(
rw
->
rw_worker
.
bgw_flags
&
BGWORKER_SHMEM_ACCESS
)
!=
0
)
{
if
(
!
EXIT_STATUS_0
(
exitstatus
)
&&
!
EXIT_STATUS_1
(
exitstatus
))
{
HandleChildCrash
(
pid
,
exitstatus
,
namebuf
);
return
true
;
}
}
if
(
!
ReleasePostmasterChildSlot
(
rw
->
rw_child_slot
))
{
/*
* Uh-oh, the child failed to clean itself up. Treat as a
* crash after all.
*/
HandleChildCrash
(
pid
,
exitstatus
,
namebuf
);
return
true
;
}
/*
* We must release the postmaster child slot whether this worker
* is connected to shared memory or not, but we only treat it as
* a crash if it is in fact connected.
*/
if
(
!
ReleasePostmasterChildSlot
(
rw
->
rw_child_slot
)
&&
(
rw
->
rw_worker
.
bgw_flags
&
BGWORKER_SHMEM_ACCESS
)
!=
0
)
{
HandleChildCrash
(
pid
,
exitstatus
,
namebuf
);
return
true
;
}
/* Get it out of the BackendList and clear out remaining data */
...
...
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