openHalo
OpenHalo is an open-source PostgreSQL kernel that provides MySQL wire-protocol compatibility.
openHalo is based on PostgreSQL 14.18 and provides wire-level compatibility with MySQL 5.7.32-log / 8.0. Pigsty delivers it through pg_mode: mysql and the openhalo package alias.
Pigsty supports OpenHalo deployment on all supported Linux platforms.
- RPM build spec: github.com/pgsty/rpm/rpmbuild/specs/openhalodb.spec
- DEB build spec: github.com/pgsty/deb/debbuild/openhalodb
Quick Start
Use Pigsty’s standard installation flow with the mysql template.
Cluster Config
OpenHalo provides a dedicated extension, aux_mysql, which includes functions and types needed for MySQL compatibility. Enable it in the postgres database to get full compatibility behavior.
- aux_mysql 1.5: MySQL Supplementary Extension
/usr/halo-14/share/postgresql/extension/aux_mysql.control$libdir/mysm,mysm.so
Usage
For MySQL access, connections still use the postgres database. The MySQL “database” concept maps to PostgreSQL “schema”. So use mysql maps to the mysql schema in the postgres database.
MySQL usernames/passwords are the same PostgreSQL credentials.
Client Access
OpenHalo listens on port 3306 for MySQL wire protocol clients.
Pigsty’s conf/mysql installs a MySQL client by default.
At present, OpenHalo upstream reports Navicat works normally on this port, while IntelliJ DataGrip may fail.
Compatibility Parameters
Pigsty defaults database_compat_mode to mysql. You can further tune compatibility behavior with settings like:
Patch Notes
The OpenHalo kernel packaged by Pigsty is based on HaloTech-Co-Ltd/openHalo with small adjustments:
- Restore default database name from
halo0roottopostgres - Remove
1.0.prefix in the default version string, keeping14.18 - Adjust default config to enable MySQL compatibility and listen on
3306
Pigsty does not provide warranty coverage for OpenHalo kernel behavior. Kernel-specific issues should be addressed with the upstream vendor.
Warning: This kernel is currently in beta1 stage; evaluate risks carefully before production use.
Available Extensions
The OpenHalo kernel has 59 available extensions. After removing bundled PG Contrib extensions, the following extra extensions remain:
| Extension | Version | Description |
|---|---|---|
| aux_mysql | 1.5 |
MySQL Supplementary Extension |
| hstore_plpython2u | 1.0 |
transform between hstore and plpython2u |
| hstore_plpythonu | 1.0 |
transform between hstore and plpythonu |
| jsonb_plpython2u | 1.0 |
transform between jsonb and plpython2u |
| jsonb_plpythonu | 1.0 |
transform between jsonb and plpythonu |
| ltree_plpython2u | 1.0 |
transform between ltree and plpython2u |
| ltree_plpythonu | 1.0 |
transform between ltree and plpythonu |