Skip to content

Remove queryids_lock #12

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikecaat
Copy link

A normal backend should only write in a dedicated array position at the very beginning of the query execution, and the underlying parallel workers will only read from the same array position during the end of query execution. As a consequence there's no need to protect array access with a lock.

Note that this locking approach can lead to severe performance degradation in some light OLTP workload with a high number of clients.

Ref: powa-team/pg_stat_kcache@6bd4b7a

A normal backend should only write in a dedicated array position at the very
beginning of the query execution, and the underlying parallel workers will only
read from the same array position during the end of query execution.  As a
consequence there's no need to protect array access with a lock.

Note that this locking approach can lead to severe performance degradation in
some light OLTP workload with a high number of clients.
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

1 participant