title

text

Dmitriy Sarafannikov
Dmitriy Sarafannikov Яндекс
12:15 07 February
45 мин

How to save statistics during major update, and what can be the consequences

It's not a secret for anyone that statistics can not be transferred with a major upgrade. For small and not heavily loaded databases this is not a problem, you can quickly collect new statistics. But we have databases with a volume of about 5TB and a load of about 100k rps, for which it became a big problem: taking off without statistics, the replicas could not even replay WAL. In my report I'll tell you what tricks we went to upgrade these databases with requirements of 100% read only availability, about what mistakes were made, and about how these errors were painfully corrected. The result of these errors was the extension called "pg_dirty_hands", in which we will collect various hacks, which can be last resort to repair data corruption.

Слайды

Видео

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

  • Ivan Frolkov
    Ivan Frolkov Postgres Professional
    45 мин

    Managing transaction workflows in Postgres Pro Enterprise

    It is often required to asynchronously perform several transactions in a strictly defined sequence, not just a single transaction. There are several ways to achieve this, and one of the solutions available is the pgpro_scheduler module.

  • Christopher Travers
    Christopher Travers DeliveryHero SE
    45 мин

    PostgreSQL at 20TB and Beyond

    In the last six months I have been working with a massive OLAP environment with 20TB shards, spanning around 400TB of data. Come to listen to how we make it all work, the challenges, and the skills involved. This talk has very little in common with the 10TB and Beyond talk because the data environments are very different.

    We will cover analytics performance, data alignment, reasons for building extensions in C, and moving data around between servers in multiple data centers.

  • Bruce Momjian
    Bruce Momjian EnterpriseDB
    180 мин

    Exploring Common Table Expressions and Window Functions

    Developers are often challenged to deliver results that are hard to implement using simple SQL queries. Fortunately, complex SQL capabilities exist in the SQL standards — common table expressions and window functions.

    SQL is a declarative language, meaning the user submits an SQL command and the database determines the optimal execution. Common Table Expressions (CTEs) allow queries to be more imperative, allowing looping and processing hierarchical structures that are normally associated only with imperative languages.

    Normal SQL queries return rows where each row is independent of the other returned rows. SQL window functions allow queries to return computed columns based on values in other rows in the result set.

    This tutorial will help developers use CTE queries in their applications and allow operations that normally could only be done in application code to be done via SQL queries. It also explains the many window function facilities and how they can be used to produce useful SQL query results.

    Video

    Part I «Programming the SQL Way with CTE»


    Part II «Postgres Window Magic»


  • Alexander Korotkov
    Alexander Korotkov Postgres Professional
    45 мин

    Pluggable storages

    Pluggable storages is hot subject in PostgreSQL development. The period of heated debates about whether we need them is over. Skepticism about pluggable storages, based on concern that they may be source of inconsistent behavior, was weakened after criticism of PostgreSQL MVCC implementation from Uber side. It became widely understandable that pluggable storages are needed at least for an alternative MVCC implementation. And that is one of way-points for pluggable storages interface design.

    At the moment, work on pluggable storages is in the practical stage. There is a thread is pgsql-hackers where few people are developing patchset and several people are doing review.

    This talk will cover following subjects:

    • overview of pluggable storages interface;
    • changes in PostgreSQL core required to implement this interface;
    • current and potential implementations of pluggable storages including heap with undo-log and in-memory OLTP engine;
    • current state of patchset and prospective of its commit
    • further development of interface allowing more possibilities in pluggable storages (columnar, index-organized, LSM and so on).