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

This article was written before SKIP LOCKED was introduced #263

Closed
wants to merge 1 commit into from
Closed

This article was written before SKIP LOCKED was introduced #263

wants to merge 1 commit into from

Conversation

guettli
Copy link

@guettli guettli commented Dec 3, 2020

No description provided.

@brandur
Copy link
Owner

brandur commented Dec 3, 2020

The issue described in the article is more subtle than that. The dead rows that caused the performance issues aren't locked by any other open transactions — they're just pure dead, but kept around the system because there is a transaction in the system that's very old. It doesn't even have to be locking any of the job rows in the question, but still blocks VACUUM on those rows just in case it might want to look at them.

SKIP LOCKED will help in some queue-type situations, and libraries like Que have gone on to implement more sophisticated locking strategies that are less prone to degrade in case of bloat, but the core problem described in the article is still present in Postgres.

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.

None yet

2 participants