Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deadlock during waiting for apply worker stop (issue #258) #260

Open
wants to merge 11 commits into
base: REL2_x_STABLE
Choose a base branch
from

Conversation

DenisRazinkin
Copy link

No description provided.

@DenisRazinkin DenisRazinkin changed the title fix deadlock during waiting for apply worker stop fix deadlock during waiting for apply worker stop (issue #258) May 25, 2020
@DenisRazinkin
Copy link
Author

#258

if (apply->proc->waitLock)
{
const LOCKTAG apply_lock_tag = apply->proc->waitLock->tag;
if (((LockTagType) apply_lock_tag.locktag_type == LOCKTAG_TRANSACTION) &&
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check works only for 2 processes deadlock cycle (apply worker and drop sub process).
PostgreSQL deadlock detection ( DeadLockCheck(PGPROC *proc) ) is not working here because drop subscription worker do not locked by apply worker, it just waiting for apply being stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants