Skip to content

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.

1 participant