# Use Cases & Architecture Patterns

> Production architecture patterns for pg_mooncake (v0.3.0): real-time operational analytics (HTAP), large table partition archiving, zero-ETL Postgres lakehouse, and OpenTelemetry log analytics.

---

LLMS index: [llms.txt](/llms.txt)

---

`pg_mooncake` enables four high-value analytical patterns directly inside PostgreSQL without introducing Kafka, Debezium, or an external data warehouse.


- [Real\-Time Operational Analytics](/docs/use-cases/real-time-analytics/) — Write to your primary OLTP rowstore table and route slow analytical aggregations to a sub-second `USING mooncake` columnstore mirror.
- [Archiving Large Postgres Tables](/docs/use-cases/archiving/) — Mirror a time-partitioned PostgreSQL table into object storage, drop old partitions from the rowstore to save disk space, and retain full queryable history in the columnstore.
- [The Postgres Lakehouse](/docs/use-cases/lakehouse/) — Automatically export PostgreSQL tables as Apache Iceberg v2 tables on S3 or Cloudflare R2, and query external Iceberg/Delta Lake datasets inside Postgres.
- [Log Analytics \& OpenTelemetry](/docs/use-cases/logging/) — Ingest high-volume application logs and traces into PostgreSQL and run fast vectorized analytical queries over object-storage-backed Parquet files.

---

Section pages:

- [Real-Time Operational Analytics (HTAP)](/docs/use-cases/real-time-analytics/): Speed up slow analytical queries on PostgreSQL tables by routing reads to a real-time USING mooncake columnstore mirror while keeping your OLTP write path unchanged.
- [Archiving Large Postgres Tables](/docs/use-cases/archiving/): Archive time-partitioned PostgreSQL tables into Parquet and Apache Iceberg storage with pg_mooncake, dropping cold partitions from the rowstore while retaining full history in the columnstore.
- [The Postgres Lakehouse](/docs/use-cases/lakehouse/): Build a bidirectional Apache Iceberg v2 lakehouse in PostgreSQL: export operational Postgres tables to S3/R2 without Kafka or Debezium, and query external lakehouse tables in SQL.
- [Log Analytics with OpenTelemetry](/docs/use-cases/logging/): Store and analyze high-volume application logs and OpenTelemetry traces in PostgreSQL with pg_mooncake and object-storage-backed Parquet columnstore mirrors.
