---
title: "Discussion on \"Understanding Database Locking in Rails & PostgreSQL (Part 1)\n\" | Hashnode"
description: "Discussion on \"Understanding Database Locking in Rails & PostgreSQL (Part 1)\n\". Learn database locking in Ruby on Rails from scratch. Understand optimistic locking, pessimistic locking, advisory locks, race conditions, deadlocks, transactions, and real production examples with ActiveRecord."
url: "https://hashnode.com/posts/understanding-database-locking-in-rails-postgresql-part-1/6a54c10885ce22766e87c425"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Understanding Database Locking in Rails & PostgreSQL (Part 1)](https://railswithyashika.hashnode.dev/understanding-database-locking-in-rails-postgresql-part-1?utm_source=hashnode&utm_medium=feed)

Learn database locking in Ruby on Rails from scratch. Understand optimistic locking, pessimistic locking, advisory locks, race conditions, deadlocks, transactions, and real production examples with ActiveRecord.

Jul 13 · 4 min read · railswithyashika.hashnode.dev  
Read the article

-   [#locking](https://hashnode.com/tag/locking)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#howto](https://hashnode.com/tag/howto)
-   [#pessimistic-locking](https://hashnode.com/tag/pessimistic-locking)
-   [#optimistic-locking](https://hashnode.com/tag/optimistic-locking)

## Written by

[Yashika Vijayvargiya](https://hashnode.com/@railswithyashika)

@railswithyashika · Pune, India

  
[View profile](https://hashnode.com/@railswithyashika)

Senior Ruby on Rails Engineer | React | System Design | Sharing Real-World Engineering Lessons

Senior Ruby on Rails Engineer sharing practical insights on Rails, React, system design, performance optimization,. My goal is to simplify complex concepts through real-world examples and hands-on experiences.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
