title

text

Alexander Kukushkin
Alexander Kukushkin Zalando SE
18:00 20 June
45 мин

Implementing failover of logical replication slots in Patroni

Logical decoding and replication slots introduced in PostgreSQL 9.4 (released in 2014) created a solid foundation for implementing built-in core logical replication in version 10 (released in 2017). Unfortunately, there are a few limitations that make logical replication not very useful in real-world scenarios. Logical decoding currently isn’t supported on the standby server, and PostgreSQL allows creating logical replication slots only on the primary server. Or in other words, logical slots are lost on failover/switchover.

Postgres hackers made many attempts to address the problem, and most of them resulted in not too much success. Although, there is one little function introduced in PostgreSQL 11 that made it possible to implement failover of logical replication slots externally.

In my talk I will tell a story of how Patroni solves the problem of logical replication slots failover without using invasive third-party extensions, dig down into some of the Postgres internals in order to prove why this approach is safe, and finally, we will discuss limitations and potential downsides of this solution.

Видео

Видео доступно участникам мероприятия, выполнившим вход в личный кабинет

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

  • Igor Kosenkov
    Igor Kosenkov Postgres Professional
    22 мин

    Disaster-tolerant cluster without data loss

    Disaster-tolerant cluster implies minimal data loss in the event of the main data center disaster and switching to the backup data center. The data loss takes place due to the asynchronous replication between the main data center and the backup one. However, there's a solution that can resolve the existing problem and ensure zero data loss in the case of the main data center disaster. My talk covers this solution for zero data loss.

  • Andrey Zubkov
    Andrey Zubkov Postgres Professional
    45 мин

    Do you want to know what VACUUM has done?

    This talk is about our work on detailed vacuum workload statistics collection by the statistics collector and about problem solutions and benefits it can provide.

  • Yury Zhukovets
    Yury Zhukovets ЗАО Дилжитал-Дизайн
    22 мин

    Temporary tables as a legacy of the transition from MS SQL. Problems, optimization, approaches

    Usage of temporary tables in PostgreSQL causes additional issues like high server resources consumption and low query performance. However, sometimes you need to rely on them especially when you need to migrate your code from MS SQL, and your initial code employed them, and you had some logic implemented at the database level. This talk covers issues related to usage of temporary tables when migrating from MS SQL, and the ways to resolve them using built-in PostgreSQL features based on the scenarios contained in the code.

  • Egor Rogov
    Egor Rogov Postgres Professional
    45 мин

    The Dark Side of “PostgreSQL Internals”

    A book. Typically a reader sees only the final product, printed on paper or opened on a computer screen. In this talk I invite you to take a look at the dark side of my recently published “PostgreSQL Internals” book. Come if you are curious why the author would want to write scripts, modify the PostgreSQL source code, and program pictures.