暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 存储引擎 - orioledb (undo, 基于b+tree, 支持copy on write checkpoint)

原创 digoal 2022-01-20
717

作者

digoal

日期

2022-02-28

标签

PostgreSQL , orioledb , undo , mvcc , b+tree , Dual pointers


https://github.com/orioledb/orioledb

https://github.com/orioledb/orioledb/blob/main/doc/arch.md

test script: https://gist.github.com/akorotkov/f5e98ba5805c42ee18bf945b30cc3d67

介绍PPT:
https://www.slideshare.net/AlexanderKorotkov/solving-postgresql-wicked-problems

OrioleDB – building a modern cloud-native storage engine

(... and solving some PostgreSQL wicked problems)

build status
codecov

OrioleDB is a new storage engine for PostgreSQL, bringing a modern approach to
database capacity, capabilities and performance to the world's most-loved
database platform.

OrioleDB consists of an extension, building on the innovative table access
method framework and other standard Postgres extension interfaces. By extending
and enhancing the current table access methods, OrioleDB opens the door to
a future of more powerful storage models that are optimized for cloud and
modern hardware architectures.

OrioleDB is currently distributed under the standard PostgreSQL license.

  1. Designed for modern hardware. OrioleDB design avoids legacy CPU bottlenecks
    on modern servers containing dozens and hundreds CPU cores, providing
    optimized usage of modern storage technologies such as SSD and NVRAM.

  2. Reduced maintenance needs. OrioleDB implements the concepts of undo log
    and page-mergins, eliminating the need for dedicated garbage collection
    processes. Additionally, OrioleDB implements default 64-bit transaction
    identifiers, thus eliminating the well-known and painful wraparound problem.

  3. Designed to be distributed. OrioleDB implements a row-level write-ahead
    log with support for parallel apply. This log architecture is optimized
    for raft consensus-based replication allowing the implementation of
    active-active multimaster.

The key technical differentiations of OrioleDB are as follows:

  1. No buffer mapping and lock-less page reading. In-memory pages in OrioleDB
    are connected with direct links to the storage pages. This eliminates the
    need for in-buffer mapping along with its related bottlenecks. Additionally,
    in OrioleDB in-memory page reading doesn't involve atomic operations.
    Together, these design decisions bring vertical scalability for Postgres
    to the whole new level.

  2. MVCC is based on the UNDO log concept. In OrioleDB, old versions of tuples
    do not cause bloat in the main storage system, but eviction into the undo
    log comprising undo chains. Page-level undo records allow the system
    to easily reclaim space occupied by deleted tuples as soon as possible.
    Together with page-mergins, these mechanisms eliminate bloat in the majority
    of cases. Dedicated VACUUMing of tables is not needed as well, removing
    a significant and common cause of system performance deterioration and
    database outages.

  3. Copy-on-write checkpoints and row-level WAL. OrioleDB utilizes
    copy-on-write checkpoints, which provides a structurally consistent snapshot
    of data every moment of time. This is friendly for modern SSDs and allows
    row-level WAL logging. In turn, row-level WAL logging is easy to
    parallelize (done), compact and suitable for active-active
    multimaster (planned).

See, usage and architecture documentation
as well as PostgresBuild 2021 slides.

OrioleDB now has public alpha status. It is recommended for experiments,
testing, benchmarking, etc., but is not recommended for production usage.
If you are interested in OrioleDB's benefits in production, please
contact us.

Before building and installing OrioleDB, one should ensure to have the following:

Typical installation procedure may look like this:

 $ git clone https://github.com/orioledb/orioledb  
 $ cd orioledb  
 $ make USE_PGXS=1  
 $ make USE_PGXS=1 install  
 $ make USE_PGXS=1 installcheck  
复制

Before starting working with OrioleDB, adding the following line to
postgresql.conf is required. This change requires a restart of
the PostgreSQL database server.

shared_preload_libraries = 'orioledb.so'  
复制

And also run the following SQL-query on the database.

CREATE EXTENSION orioledb;  
复制

Once the above steps are complete, you can start using OrioleDB's tables.
See usage documentation for details.

CREATE TABLE table_name (...) USING orioledb;  
复制

期望 PostgreSQL 增加什么功能?

PolarDB for PostgreSQL云原生分布式开源数据库

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论