orioledb
OrioleDB,下一代事务处理引擎
仓库
orioledb/orioledb
https://github.com/orioledb/orioledb
源码
orioledb-beta14.tar.gz
orioledb-beta14.tar.gz
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
orioledb | 1.6 | FEAT | PostgreSQL | C |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 2910 | orioledb | 否 | 是 | 是 | 是 | 否 | 是 | - |
| 相关扩展 | pg_mooncake citus_columnar pg_analytics pg_duckdb timescaledb citus pg_strom |
|---|
special case: this extension only works on patched postgres kernel: oriolepg, 1.6-beta14
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.6 | 1817161514 | orioledb | - |
| RPM | PIGSTY | 1.6 | 1817161514 | orioledb_$v | oriolepg_$v |
| DEB | PIGSTY | 1.6 | 1817161514 | oriolepg-$v-orioledb | oriolepg-$v |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY MISS | PIGSTY 1.6 el8.x86_64.pg17 : orioledb_17 orioledb_17-1.6-beta14PIGSTY.el8.x86_64.rpm
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el8.aarch64 | PIGSTY MISS | PIGSTY 1.6 el8.aarch64.pg17 : orioledb_17 orioledb_17-1.6-beta14PIGSTY.el8.aarch64.rpm
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el9.x86_64 | PIGSTY MISS | PIGSTY 1.6 el9.x86_64.pg17 : orioledb_17 orioledb_17-1.6-beta14PIGSTY.el9.x86_64.rpm
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el9.aarch64 | PIGSTY MISS | PIGSTY 1.6 el9.aarch64.pg17 : orioledb_17 orioledb_17-1.6-beta14PIGSTY.el9.aarch64.rpm
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el10.x86_64 | PIGSTY MISS | PIGSTY 1.6 el10.x86_64.pg17 : orioledb_17 orioledb_17-1.6-beta14PIGSTY.el10.x86_64.rpm
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el10.aarch64 | PIGSTY MISS | PIGSTY 1.6 el10.aarch64.pg17 : orioledb_17 orioledb_17-1.6-beta14PIGSTY.el10.aarch64.rpm
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d12.x86_64 | PIGSTY MISS | PIGSTY 1.6 d12.x86_64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~bookworm_amd64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d12.aarch64 | PIGSTY MISS | PIGSTY 1.6 d12.aarch64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~bookworm_arm64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d13.x86_64 | PIGSTY MISS | PIGSTY 1.6 d13.x86_64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~trixie_amd64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d13.aarch64 | PIGSTY MISS | PIGSTY 1.6 d13.aarch64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~trixie_arm64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u22.x86_64 | PIGSTY MISS | PIGSTY 1.6 u22.x86_64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~jammy_amd64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u22.aarch64 | PIGSTY MISS | PIGSTY 1.6 u22.aarch64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~jammy_arm64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u24.x86_64 | PIGSTY MISS | PIGSTY 1.6 u24.x86_64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~noble_amd64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u24.aarch64 | PIGSTY MISS | PIGSTY 1.6 u24.aarch64.pg17 : oriolepg-17-orioledb oriolepg-17-orioledb_1.6-0.beta14PIGSTY~noble_arm64.deb
| PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
构建
您可以使用 pig build 命令构建 orioledb 扩展的 RPM / DEB 包:
pig build pkg orioledb # 构建 RPM / DEB 包
安装
您可以直接安装 orioledb 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
pig repo add pgsql -u # 添加仓库并更新缓存
使用 pig 或者是 apt/yum/dnf 安装扩展:
pig install orioledb; # 当前活跃 PG 版本安装
pig ext install -y orioledb -v 17 # PG 17
dnf install -y orioledb_17 # PG 17
apt install -y oriolepg-17-orioledb # PG 17
预加载配置:
shared_preload_libraries = 'orioledb';
创建扩展:
CREATE EXTENSION orioledb;
用法
OrioleDB 是 PostgreSQL 的新型存储引擎,为数据库容量、能力和性能提供现代化方案。它使用基于撤销日志的 MVCC、写时复制检查点和行级 WAL,消除了膨胀问题和 VACUUM 的需求。
配置
在 postgresql.conf 中添加(需要重启):
shared_preload_libraries = 'orioledb.so'
然后启用扩展:
CREATE EXTENSION orioledb;
创建表
使用 USING orioledb 子句创建采用 OrioleDB 存储引擎的表:
CREATE TABLE my_table (
id serial PRIMARY KEY,
name text,
value numeric
) USING orioledb;
所有标准 PostgreSQL 操作均可用于 OrioleDB 表:
INSERT INTO my_table (name, value) VALUES ('test', 42);
SELECT * FROM my_table WHERE id = 1;
UPDATE my_table SET value = 100 WHERE id = 1;
DELETE FROM my_table WHERE id = 1;
排序规则要求
OrioleDB 表仅支持 ICU、C 和 POSIX 排序规则。为避免在每个文本字段上指定 COLLATE,请使用适当的默认值创建数据库:
CREATE DATABASE mydb LOCALE 'C' TEMPLATE template0;
-- 或
CREATE DATABASE mydb LOCALE_PROVIDER icu ICU_LOCALE 'en' TEMPLATE template0;
主要优势
- 无膨胀:基于撤销日志的 MVCC 意味着旧元组版本不会膨胀主存储
- 无需 VACUUM:页面合并和撤销日志自动回收空间
- 无回卷问题:原生 64 位事务标识符
- 无锁页面读取:内存页面直接链接到存储页面
- 行级 WAL:紧凑的预写日志,适合并行回放
限制
- 公测阶段 – 建议用于测试,不建议用于生产
- 需要来自 orioledb/postgres 的补丁版 PostgreSQL 构建
- 仅支持 ICU、C 和 POSIX 排序规则