Today I Learned

hashrocket A Hashrocket project

Access Exclusive locks block select statements

The alter table, vacuum full, reindex, and refresh materialized view statements are a few examples that may take out an ACCESS EXCLUSIVE lock by default. This means that select statements are blocked until one of these statements has finished.

See More #sql TILs
Looking for help? Hashrocket developers believe that data quality is as important as code quality. We enjoy all the challenges of relational databases, from finding the fastest index, to structuring data to fit the needs of an application. We're eager to share our experiences; check out PG Casts, our series of free PostgreSQL screencasts.