WeSearch

Shinya Kato: 5 PostgreSQL locking behaviors that trip people up

·8 min read · 0 reactions · 0 comments · 15 views
#database#postgresql#locking#performance#management
Shinya Kato: 5 PostgreSQL locking behaviors that trip people up
⚡ TL;DR · AI summary

This article discusses five PostgreSQL locking behaviors that can lead to unexpected issues. It highlights how certain locking mechanisms can cause queries to block each other, resulting in longer execution times or even outages. Understanding these behaviors is crucial for effective database management and performance optimization.

Key facts
Original article
DEV Community
Read full at DEV Community →
Opening excerpt (first ~120 words) tap to expand

try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 2629632) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Shinya Kato Posted on May 26 5 PostgreSQL locking behaviors that trip people up #database #postgres Introduction PostgreSQL uses MVCC (Multi-Version Concurrency Control) for concurrency control: reads never block writes, and writes never block reads. Its locking system has 8 table-level lock modes and 4 row-level lock modes, and the conflict tables in the documentation tell you exactly which lock modes conflict with which.

Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV Community.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from DEV Community