Mooncake-Labs/pg_mooncake
Mooncake-Labs/pg_mooncake has 2,016 GitHub stars and 77 forks. GitHot measured +1 stars in 24 hours, +4 in 7 days, and +5 in 15 days. Last checked 2026-11-10 21:59 UTC. Last push 2026-03-31.
Real-time analytics on Postgres tables
측정된 스타 증가
- in 24h
- +1
- in 7 days
- +4
- in 15 days
- +5
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalOverview
pg_mooncake is a Postgres extension that creates a columnstore mirror of your Postgres tables in Iceberg, enabling fast analytics queries with sub-second freshness:
- Real-time ingestion powered by moonlink for streaming and batched INSERT/UPDATE/DELETE.
- Fast analytics accelerated by DuckDB, ranking top 10 on ClickBench.
- Postgres-native allowing you to query a columnstore table just like a regular Postgres table.
- Iceberg-native making your data readily accessible by other query engines.
Installation
Option 1: Docker
For new users, we recommend using the Docker image to get started quickly:
docker run --name mooncake --rm -e POSTGRES_PASSWORD=password mooncakelabs/pg_mooncake
This will start Postgres with pg_mooncake preinstalled. You can then connect to it using psql with the default user postgres:
docker exec -it mooncake psql -U postgres
Option 2: From Source
To build pg_mooncake, first install Rust, pgrx, and the build tools for DuckDB.
Then, clone the repository:
git clone --recurse-submodules https://github.com/Mooncake-Labs/pg_mooncake.git
To build and install for Postgres versions 14-18, run:
cargo pgrx init --pg18=$(which pg_config) # Replace with your Postgres version
make pg_duckdb # Skip if pg_duckdb is already installed
make install PG_VERSION=pg18
Finally, add pg_mooncake to shared_preload_libraries in your postgresql.conf file and enable logical replication:
duckdb.allow_community_extensions = true
shared_preload_libraries = 'pg_duckdb,pg_mooncake'
wal_level = logical
For a complete walkthrough, refer to our Dockerfile.
Quick Start
First, create the pg_mooncake extension:
CREATE EXTENSION pg_mooncake CASCADE;
Next, create a regular Postgres table trades:
CREATE TABLE trades(
id bigint PRIMARY KEY,
symbol text,
time timestamp,
price real
);
Then, create a columnstore mirror trades_iceberg that stays in sync with trades:
CALL mooncake.create_table('trades_iceberg', 'trades');
Now, insert some data into trades:
INSERT INTO trades VALUES
(1, 'AMD', '2024-06-05 10:00:00', 119),
(2, 'AMZN', '2024-06-05 10:05:00', 207),
(3, 'AAPL', '2024-06-05 10:10:00', 203),
(4, 'AMZN', '2024-06-05 10:15:00', 210);
Finally, query trades_iceberg to see that it reflects the up-to-date state of trades:
SELECT avg(price) FROM trades_iceberg WHERE symbol = 'AMZN';
Contributing
pg_mooncake is an open-source project maintained by Mooncake Labs and licensed under the MIT License. We'd love your help to make it even better! Join our Slack, participate in discussions, open issues to report bugs or suggest features, contribute code and documentation, or help us improve the project in any way. All contributions are welcome! 🥮
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,830 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,395 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,473 스타