title

text

Mikhail Tyurin
Mikhail Tyurin ИТ предприниматель
16:00 17 March
22 мин

Deadlock explanations

< Query failed: ERROR: deadlock detected
< DETAIL: Process 17371 waits for ShareLock on transaction 102733872; Blocked by process.
< Process 10414 waits for ShareLock on transaction 102733874; Blocked by process 17371.

Such "unpleasant" messages from the server can seriously puzzle the developer. When working with locks, in particular, with transactions in general, it is necessary to take into account the features of the implementation of client libraries, which can cause the above exception.

In the short talk, the mechanics of the interaction of locks will be explained, main attention being paid to causes of deadlocks. References to the relevant documentation pages will be given. A technique of "bypassing" this problem of concurrent data access will be described and illustrated with some generalized examples from practice are shown. The talk will be interesting to database developers and administrators as well as the client-side application developers.

Слайды

Видео

Другие доклады

  • Peter  van Hardenberg
    Peter van Hardenberg Heroku
    45 мин

    The History of Postgres

    The PostgreSQL community is over 20 years old, but the history of PostgreSQL dates back even farther. In this talk, we'll learn about the roots of the Postgres project, learn about some of the people who contribute to it, study how it has changed over time, and pay special attention to the many contributions of Russian people.

  • Alexander Korotkov
    Alexander Korotkov Postgres Professional
    Andrei Nikolayenko
    Andrei Nikolayenko Скала-Р
    Борис Нейман
    Борис Нейман Mellanox
    22 мин
  • Alvaro Hernandez
    Alvaro Hernandez 8Kdata
    180 мин

    PostgreSQL & Java Tutorial

    Java is one of the most used languages when programming with PostgreSQL databases. Join this tutorial to learn or review the techniques to connect to postgres, best programming practices with JDBC, and to explore jOOQ, a mapper software that allows you to use the full power of SQL and postgres advanced query features while avoiding all the boilerplate code.

    This tutorial is very practical: most of the time will be dedicated to iterate through code samples. It will cover:

    • Introduction to Java and PostgreSQL
    • Ways of connecting to PostgreSQL from Java (not only JDBC!)
    • Introduction to JDBC. JDBC types. PostgreSQL JDBC
    • Code demo: JDBC with PostgreSQL. From Java 1.4 to Java 8, best practices and code samples
    • Code demo: jOOQ, a great mapper for PostgreSQL
    • Java inside PostgreSQL
    • The future of Java and PostgreSQL

    About two-thirds of the tutorial will be dedicated to iterate over code samples and demos. All the code would be available from public open-source repositories and built with maven, so that any attendee may download it and build easily to play with it during the tutorial (although not required).

    VIDEO

    Part 1

    Part 2

    Part 3

    Part 4

  • Dmitry Ivanov
    Dmitry Ivanov Postgres Professional
    Ildar Musin
    Ildar Musin Postgres Professional
    45 мин

    Partitioning with pg_pathman

    Partitioning is a long-awaited feature in PostgreSQL. Although Postgres supports partitioning via inheritance, this approach has some disadvantages, such as the need to manually create partitions and support triggers, significant planning overhead, and no query execution optimizations. In this talk, we’ll tell you about the pg_pathman extension we are developing. pg_pathman supports HASH and RANGE partitioning, performs planning and execution optimizations, supports fast insert by using Custom Node instead of triggers, provides functions for partition management (add, split, merge, etc.), supports FDW, non-blocking data migration, and more. We'll also speak about pg_pathman integration with Postgres Pro Enterprise Edition and Oracle-like syntax support for partitioning. Finally, we'll discuss new partitioning capabilities in PostgreSQL 10, the already implemented features and further development plans.

    VIDEO