# Kernel

> Replace vanilla PostgreSQL with exotic kernel forks
---

Pigsty supports various PostgreSQL kernels and compatible forks,
enabling you to simulate different database systems while leveraging PostgreSQL's ecosystem.
Each kernel provides unique capabilities and compatibility layers.


## Database Kernels


**PostgreSQL**


Vanilla Postgres with 437 Extensions



**Citus**


Native Distributive Extension



**Babelfish**


SQL Server wire-compatible



**IvorySQL**


Oracle grammar & PL/SQL compatible



**OpenHalo**


MySQL wire-compatibility



**Percona**


Transparent Data Encryption



**OrioleDB**


OLTP-optimized cloud-native storage engine



**PolarDB PG**


Aurora-like RAC with china domestic compliance



**Supabase**


Backend as a Service, self-hosting Firebase



**FerretDB**


Mongo Wire-Compatibility over PostgreSQL







--------

## Choose the Right Kernel

**Note**

**Flexible Kernel**: Choose the right kernel for your specific use case - whether you need MSSQL compatibility, Oracle features, or horizontal scaling capabilities.

|                    Kernel                    | Key Feature                     | Description                                      |
|:--------------------------------------------:|---------------------------------|--------------------------------------------------|
|     [PostgreSQL](/docs/pgsql/kernel/postgres)     | **Original Flavor**             | Vanilla PostgreSQL with 437 extensions           |
|         [Citus](/docs/pgsql/kernel/citus)         | **Horizontal Scaling**          | Distributive PostgreSQL via native extension     |
|     [WiltonDB](/docs/pgsql/kernel/babelfish)      | **SQL Server Migration**        | SQL Server wire-compatibility                    |
|      [IvorySQL](/docs/pgsql/kernel/ivorysql)      | **Oracle Migration**            | Oracle Grammar and PL/SQL compatible             |
|      [OpenHalo](/docs/pgsql/kernel/openhalo)      | **MySQL Migration**             | MySQL wire-protocol compatibility                |
|       [Percona](/docs/pgsql/kernel/percona)       | **Transparent Data Encryption** | Percona Distribution with pg_tde                 |
|      [FerretDB](/docs/pgsql/kernel/ferretdb)      | **MongoDB Migration**           | MongoDB wire-protocol compatibility              |
|      [OrioleDB](/docs/pgsql/kernel/orioledb)      | **OLTP Optimization**           | Zheap, No bloat, S3 Storage                      |
|       [PolarDB](/docs/pgsql/kernel/polardb)       | **Aurora flavor RAC**           | RAC, China domestic compliance                   |
|      [Supabase](/docs/pgsql/kernel/supabase)      | **Backend as Service**          | BaaS based on PostgreSQL, Firebase alternative   |
| [Cloudberry (WIP)](/docs/pgsql/kernel/cloudberry) | **MPP DW & Analytics**          | Massively parallel processing database warehouse |



--------

## Citus (Distributive) {#citus}

<a href="/docs/pgsql/kernel/citus" class="no-underline">Citus</a>
Native Distributive

Citus transforms PostgreSQL into a distributed database system, enabling horizontal scaling across multiple nodes.
Deploy native HA Citus clusters with Pigsty for better throughput and performance.

### Key Features

- **Distributed Tables**: Automatically shard tables across worker nodes
- **Distributed Queries**: Execute queries across the entire cluster
- **High Availability**: Built-in replication and failover capabilities
- **Real-time Analytics**: Handle both transactional and analytical workloads
- **Postgres Compatibility**: Maintain full PostgreSQL feature compatibility

### Use Cases

- Multi-tenant SaaS applications requiring horizontal scaling
- Real-time analytics on large datasets
- High-throughput OLTP workloads
- Applications need to scale beyond single-node limitations

**Note**

**Planning Required**: Proper shard key selection is crucial for optimal performance and avoiding cross-shard queries.

--------

## Babelfish (MSSQL) {#babelfish}

<a href="/docs/pgsql/kernel/babelfish" class="no-underline">Babelfish</a>
SQL Server Wire Compatible

**Note**

SQL Server Compatible **Note**

Beta

Create SQL Server-compatible PostgreSQL clusters with WiltonDB and Babelfish, providing wire protocol-level compatibility with Microsoft SQL Server.

### Key Features

- **T-SQL Support**: Execute T-SQL queries natively
- **Wire Protocol Compatibility**: Connect using SQL Server drivers and tools
- **Stored Procedures**: Support for T-SQL stored procedures and functions
- **Data Types**: Compatible with SQL Server data types and behaviors
- **Migration Tools**: Simplified migration from SQL Server environments

### Use Cases

- Migrating legacy SQL Server applications to PostgreSQL
- Multi-database environments requiring SQL Server compatibility
- Cost reduction while maintaining application compatibility
- Cloud migration from SQL Server to open-source alternatives

**Note**

**Migration Path**: Ideal for organizations looking to reduce licensing costs while maintaining existing SQL Server application compatibility.

--------

## IvorySQL (Oracle) {#ivorysql}

<a href="/docs/pgsql/kernel/ivorysql" class="no-underline">Babelfish</a>
Oracle Grammar Compatible

Run Oracle-compatible PostgreSQL clusters with the IvorySQL kernel, open-sourced by HighGo, providing Oracle syntax and feature compatibility.

### Key Features

- **PL/SQL Support**: Execute PL/SQL code with minimal modifications
- **Oracle Syntax**: Support for Oracle-specific SQL syntax and functions
- **Package Support**: Oracle-style package and procedure definitions
- **Data Types**: Oracle-compatible data types and behaviors
- **Migration Tools**: Utilities for Oracle to PostgreSQL migration

### Use Cases

- Oracle database migration projects
- Organizations seeking Oracle feature compatibility
- Cost optimization while preserving Oracle functionality
- Development environments requiring Oracle compatibility

**Note**

**Enterprise Focus**: Particularly valuable for enterprises with significant Oracle investments looking for migration paths.

--------

## OpenHalo (MySQL) {#openhalo}

<a href="/docs/pgsql/kernel/openhalo" class="no-underline">OpenHalo</a>
MySQL Wire-Compatible

The OpenHalo kernel provides MySQL-compatible PostgreSQL functionality, accessible using standard MySQL clients and protocols.

### Key Features

- **MySQL Protocol**: Wire-level compatibility with MySQL protocol
- **Client Compatibility**: Use existing MySQL drivers and tools
- **SQL Dialect**: Support for MySQL-specific SQL syntax
- **Migration Support**: Simplified migration from MySQL environments
- **Ecosystem Integration**: Leverage PostgreSQL's advanced features with MySQL compatibility

### Use Cases

- MySQL application migration to PostgreSQL
- Multi-database environments requiring MySQL compatibility
- Leveraging PostgreSQL features while maintaining MySQL interface
- Gradual migration strategies from MySQL to PostgreSQL

**Note**

**Early Stage**: Currently experimental - evaluate thoroughly before production use.

--------

## OrioleDB (OLTP) {#orioledb}

<a href="/docs/pgsql/kernel/openhalo" class="no-underline">OrioleDB</a>
OLTP Optimized Cloud Native

A PostgreSQL storage engine optimized for OLTP workloads, eliminating transaction ID wraparound issues and table bloat while supporting cloud storage.

Compatible with PostgreSQL 17, Available on all support platforms.

### Key Features

- **No XID Wraparound**: Eliminates transaction ID wraparound maintenance
- **No Table Bloat**: Advanced storage management prevents table bloat
- **Cloud Storage**: Native support for S3-compatible object storage
- **OLTP Optimization**: Specifically designed for transactional workloads
- **Improved Performance**: Better space utilization and query performance

### Use Cases

- High-frequency transactional applications
- Cloud-native deployments requiring object storage
- Applications suffering from PostgreSQL maintenance overhead
- Systems requiring consistent performance without vacuum cycles

**Note**

**Early Stage**: Currently in Beta - evaluate thoroughly before production use.

--------

## PolarDB PG (RAC) {#polardb}

<a href="/docs/pgsql/kernel/polardb" class="no-underline">PolarDB</a>
Aurora Flavor RAC


Replace vanilla PostgreSQL with PolarDB PG, an open-source Aurora-like solution similar to Oracle RAC with shared storage architecture.

### Key Features

- **Shared Storage**: Multiple compute nodes sharing the same storage layer
- **Read Scaling**: Add read replicas without storage duplication
- **Fast Recovery**: Rapid recovery through shared storage architecture
- **Cost Efficiency**: Reduced storage costs through sharing
- **High Availability**: Built-in failover and disaster recovery

### Use Cases

- Applications requiring extreme read scalability
- Cost-sensitive deployments needing high availability
- Cloud environments with shared storage infrastructure
- Workloads with variable read/write patterns

**Note**

**Cloud Architecture**: Designed for cloud environments with disaggregated compute and storage.

--------

## Supabase (Firebase) {#supabase}


<a href="/docs/pgsql/kernel/supabase" class="no-underline">Supabase</a>
Backend as a Service


Self-host Supabase with existing managed HA PostgreSQL clusters, launching the stateless components with docker-compose for a complete Firebase alternative.

### Key Features

- **Real-time APIs**: Auto-generated REST and GraphQL APIs
- **Real-time Subscriptions**: WebSocket-based real-time data sync
- **Authentication**: Built-in user authentication and authorization
- **Storage**: File storage with CDN capabilities
- **Edge Functions**: Serverless functions for custom logic

### Use Cases

- Rapid application development with backend-as-a-service
- Real-time applications requiring instant data sync
- JAMstack applications needing serverless backend
- Mobile and web apps require authentication and storage

**Note**

**Full Stack**: Provides a complete backend solution with PostgreSQL as the foundation.

--------

## Cloudberry (MPP) {#cloudberry}

<a href="/docs/pgsql/kernel/cloudberry" class="no-underline">Cloudberry</a>
MPP Data Warehouse

Install and monitor Greenplum / Cloudberry / YMatrix MPP clusters with Pigsty for large-scale analytical processing and data warehousing.

### Key Features

- **Massively Parallel Processing**: Distribute queries across multiple nodes
- **Columnar Storage**: Optimized storage for analytical workloads
- **Advanced Analytics**: Built-in machine learning and statistical functions
- **Petabyte Scale**: Handle massive datasets with linear scalability
- **Standard SQL**: Full SQL compliance with PostgreSQL compatibility

### Use Cases

- Data warehousing and business intelligence
- Large-scale analytics and reporting
- Machine learning on big datasets
- ETL processing for enterprise data platforms

**Note**

**Enterprise Analytics**: Designed for enterprise-scale analytical workloads requiring massive parallel processing capabilities.

---

Section pages:

- [PostgreSQL](/docs/pgsql/kernel/postgres/): The vanilla PostgreSQL kernel with 437 extensions
- [Citus](/docs/pgsql/kernel/citus/): Native Distributive Extension for PostgreSQL Sharding
- [Babelfish](/docs/pgsql/kernel/babelfish/): MS SQL Server Wire compatibility on PostgreSQL
- [IvorySQL](/docs/pgsql/kernel/ivorysql/): PostgreSQL fork with oracle (grammar) compatibility
- [Percona](/docs/pgsql/kernel/percona/): Percona Postgres Distribution with TDE support
- [PolarDB](/docs/pgsql/kernel/polardb/): PolarDB for PostgreSQL, with aurora flavor RAC
- [OrioleDB](/docs/pgsql/kernel/orioledb/): Next Gen OLTP engine for PostgreSQL
- [OpenHalo](/docs/pgsql/kernel/openhalo/): MySQL Compatible Postgres 14 Fork
- [Cloudberry](/docs/pgsql/kernel/cloudberry/): Cloudberry and Greenplum, the MPP data warehouse
- [Supabase](/docs/pgsql/kernel/supabase/): Self-hosting BaaS upon PostgreSQL
- [FerretDB](/docs/pgsql/kernel/ferretdb/): Mongo Wire Compatible PostgreSQL
