achfrag.net/2024/02/28/trace-postgresql-row-level-locks.html
Preview meta tags from the achfrag.net website.
Linked Hostnames
11- 13 links toachfrag.net
- 6 links togithub.com
- 2 links towww.linkedin.com
- 1 link tojnidzwetzki.github.io
- 1 link toscholar.google.com
- 1 link totwitter.com
- 1 link towww.facebook.com
- 1 link towww.postgresql.org
Thumbnail

Search Engine Appearance
Trace PostgreSQL Row-Level Locks with pg_row_lock_tracer
PostgreSQL uses several types of locks to coordinate parallel transactions and manage access to resources like tuples, tables, and in-memory data structures. Heavyweight locks are used to control access to tables. Lightweight locks (LWLocks) manage access to data structures, such as adding data to the write-ahead log (WAL). Row-level locks control access to individual tuples. For example, tuples need to be locked when executing an SQL statement like SELECT * FROM table WHERE i > 10 FOR UPDATE;. The tuples returned by the query are internally locked with an exclusive lock (LOCK_TUPLE_EXCLUSIVE). Another transaction attempting to lock the same tuples must wait until the first transaction releases the locks. In this article, we discuss the tool pg_row_lock_tracer, which uses eBPF and UProbes to trace PostgreSQL’s row-locking behavior. The tool can be downloaded from the pg-lock-tracer project website. This is the third article in a series about tracing PostgreSQL locks. The first article covers the tracing of heavyweight locks, and the second article focuses on LW locks.
Bing
Trace PostgreSQL Row-Level Locks with pg_row_lock_tracer
PostgreSQL uses several types of locks to coordinate parallel transactions and manage access to resources like tuples, tables, and in-memory data structures. Heavyweight locks are used to control access to tables. Lightweight locks (LWLocks) manage access to data structures, such as adding data to the write-ahead log (WAL). Row-level locks control access to individual tuples. For example, tuples need to be locked when executing an SQL statement like SELECT * FROM table WHERE i > 10 FOR UPDATE;. The tuples returned by the query are internally locked with an exclusive lock (LOCK_TUPLE_EXCLUSIVE). Another transaction attempting to lock the same tuples must wait until the first transaction releases the locks. In this article, we discuss the tool pg_row_lock_tracer, which uses eBPF and UProbes to trace PostgreSQL’s row-locking behavior. The tool can be downloaded from the pg-lock-tracer project website. This is the third article in a series about tracing PostgreSQL locks. The first article covers the tracing of heavyweight locks, and the second article focuses on LW locks.
DuckDuckGo
Trace PostgreSQL Row-Level Locks with pg_row_lock_tracer
PostgreSQL uses several types of locks to coordinate parallel transactions and manage access to resources like tuples, tables, and in-memory data structures. Heavyweight locks are used to control access to tables. Lightweight locks (LWLocks) manage access to data structures, such as adding data to the write-ahead log (WAL). Row-level locks control access to individual tuples. For example, tuples need to be locked when executing an SQL statement like SELECT * FROM table WHERE i > 10 FOR UPDATE;. The tuples returned by the query are internally locked with an exclusive lock (LOCK_TUPLE_EXCLUSIVE). Another transaction attempting to lock the same tuples must wait until the first transaction releases the locks. In this article, we discuss the tool pg_row_lock_tracer, which uses eBPF and UProbes to trace PostgreSQL’s row-locking behavior. The tool can be downloaded from the pg-lock-tracer project website. This is the third article in a series about tracing PostgreSQL locks. The first article covers the tracing of heavyweight locks, and the second article focuses on LW locks.
General Meta Tags
9- titleTrace PostgreSQL Row-Level Locks with pg_row_lock_tracer | Jan’s website and blog
- charsetutf-8
- viewportwidth=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=5
- generatorJekyll v3.10.0
- authorJan Nidzwetzki
Open Graph Meta Tags
8- og:imagehttps://jnidzwetzki.github.io/assets/img/flamegraph2.png
- og:typewebsite
- og:titleTrace PostgreSQL Row-Level Locks with pg_row_lock_tracer
og:locale
en_US- og:descriptionPostgreSQL uses several types of locks to coordinate parallel transactions and manage access to resources like tuples, tables, and in-memory data structures. Heavyweight locks are used to control access to tables. Lightweight locks (LWLocks) manage access to data structures, such as adding data to the write-ahead log (WAL). Row-level locks control access to individual tuples. For example, tuples need to be locked when executing an SQL statement like SELECT * FROM table WHERE i > 10 FOR UPDATE;. The tuples returned by the query are internally locked with an exclusive lock (LOCK_TUPLE_EXCLUSIVE). Another transaction attempting to lock the same tuples must wait until the first transaction releases the locks. In this article, we discuss the tool pg_row_lock_tracer, which uses eBPF and UProbes to trace PostgreSQL’s row-locking behavior. The tool can be downloaded from the pg-lock-tracer project website. This is the third article in a series about tracing PostgreSQL locks. The first article covers the tracing of heavyweight locks, and the second article focuses on LW locks.
Twitter Meta Tags
6- twitter:cardsummary
- twitter:titleTrace PostgreSQL Row-Level Locks with pg_row_lock_tracer
- twitter:descriptionPostgreSQL uses several types of locks to coordinate parallel transactions and manage access to resources like tuples, tables, and in-memory data structures....
- twitter:cardsummary
- twitter:imagehttps://jnidzwetzki.github.io/assets/img/flamegraph2.png
Link Tags
5- alternatehttps://jnidzwetzki.github.io/feed.xml
- alternatehttps://jnidzwetzki.github.io/feed.xml
- canonicalhttps://jnidzwetzki.github.io/2024/02/28/trace-postgresql-row-level-locks.html
- shortcut icon/assets/favicon.ico
- stylesheet/assets/css/main.css
Emails
1Links
29- https://achfrag.net
- https://achfrag.net/2023/01/11/trace-postgresql-locks-with-pg-lock-tracer.html
- https://achfrag.net/2023/01/17/trace-postgresql-lw-locks.html
- https://achfrag.net/2024/01/11/index-postgresql-source-code-with-elixir.html
- https://achfrag.net/2024/04/03/postgres-and-snapshots.html