Presented by:

9925e18c0aef1b6574956603548cb7e7

Abhijit Menon-Sen

from 2ndQuadrant

Download slides

Postgres uses locks at every level in order to support concurrent operations. These include spinlocks, lightweight locks, and regular (heavyweight) locks. Each of these lock types has different properties and applications, but they all have a direct impact on performance and scalability. Understanding how these locks are used and how they interact can help to understand how your server will perform with an increase in the number of concurrent clients.

This talk will cover the various types of locks in Postgres, discuss their scope and behaviour, and look at how they can be used and monitored at the SQL level. We will talk about the different levels of locks that internal and application code can acquire, and how they can conflict, and when and how this can lead to deadlocks. We will also briefly discuss some special considerations around locking when streaming replication is in use.

(Disclaimer: this talk may include sketchy diagrams with garish colours.)

Date:
2020 February 28 - 11:45
Duration:
40 min
Room:
Grand Victoria 1
Conference:
PGConf India, 2020
Language:
Track:
Database Administration
Difficulty:
Medium

Happening at the same time:

  1. Real time data streaming in PostgreSQL
  2. Start Time:
    2020 February 28 11:45

    Room:
    Grand Victoria 2

  3. Deeper Understanding of PostgreSQL Execution Plan : At plan time and run time
  4. Start Time:
    2020 February 28 11:45

    Room:
    Robusta + Arabica