pg_mooncake

(โ˜… 2,004)

Real-time analytics on Postgres tables

  • .gitignore
  • .gitmodules
  • Cargo.toml
  • CHANGELOG.md
  • Dockerfile
  • duckdb_mooncake
  • LICENSE
  • Makefile
  • moonlink
  • pg_duckdb
  • pg_mooncake.control
  • README.md
  • rust-toolchain.toml

# Installation Guide

1. Get the code
git clone https://github.com/Mooncake-Labs/pg_mooncake

Downloads the entire project code from GitHub to your computer.

cd pg_mooncake

Moves into the project folder you just downloaded.

2. Docker

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker run --name mooncake --rm -e POSTGRES_PASSWORD=password mooncakelabs/pg_mooncake

Runs the built image as an actual container.

docker exec -it mooncake psql -U postgres

Type this command into your terminal and run it.

โœ… Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.

Pulled directly from this repo's README.

3. Rust

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Rust (rustup) Installing via rustup also installs cargo.
cargo pgrx init --pg18=$(which pg_config) # Replace with your Postgres version

Type this command into your terminal and run it.

โœ… If cargo build finishes without errors, it worked. The executable is created under target/.

Pulled directly from this repo's README.

4. Make

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make pg_duckdb # Skip if pg_duckdb is already installed

Compiles the code based on the generated build configuration to produce an executable.

make install PG_VERSION=pg18

Compiles the code based on the generated build configuration to produce an executable.

โœ… If it finishes without errors, it worked. Try running the generated executable directly.

Pulled directly from this repo's README.

// repository documentation