Skip to content

This is the multi-page printable view of this section.

Return to the regular view of this page

Kernel Patches

One community base and four pairs of upstream imports and Mimus adaptations, in build order.

Start at Base for the PostgreSQL version and the data directory’s feature requirements. Then follow the pairs in order. The first layer of each pair carries selected upstream changes. The second integrates them with the preceding layers and the matching extension. A server built through 401 contains all four groups. Use native PostgreSQL alone or enable one compatibility listener per instance. TDE and Spock serve storage and replication independently.

1 - Base · PostgreSQL 19.0

Identify the community base, the Mimus revision and the directory requirements recorded by patch 000.

Version identity

19.0.1 means community PostgreSQL 19.0 (REL_19_0, 5c839a2a08b9) plus Mimus revision 1. In 19.0.1-r4, the final patch commit 7af97b6707f5 and the integration commit 0d8a551aa121 in pgsty/mimus have the same tree, 07fbb73680de. The candidate was built from that tree. Some programs in this build, including pg_dump --version, report PostgreSQL 19.0. Keep the build revision and the extension builds with the backup inventory. PostgreSQL 19 manual

What 000 shares

Patch 000 adds common code to record features on first use and check requirements when the server starts. Later pairs supply the feature-specific checks. Read SHOW mimus_required_features on a running server. An unused cluster starts with an empty list. A cluster that installed an extension can still need its recovery support after application sessions disconnect. Preserve the recorded requirements and provision the matching recovery software.

No extension is needed for native PostgreSQL connections. Start here to connect with psql or check the tested platforms.

Match the extension sources

The r4 freeze records the nine kernel layers and the extension inputs in patch/series.json (format 8, patch repository commit 4089ead024de). The kernel layers are 000, 100, 101, 200, 201, 300, 301, 400 and 401, in that order. The standard installation prefix is /usr/mimus-19. Build each extension with that installation’s bin/pg_config and headers. The SQL extension version alone cannot identify a local adaptation.

For a MySQL installation, the mimus/ checkout already contains the integrated kernel. The sibling pg_mysql/ checkout supplies the complete extension. Build from the two source repositories

ComponentSource to buildResulting Git tree
pg_tdepg_tde/ at 5424c937188c plus ext-pg-tde- patches 000, 002, 007, 008, 009, 010 in manifest orderc62d1e2dceae
Spockspock/ at 5.0.15, frozen commit e710faa6fe21126d898fa660e9b6dc8ed0da94388da352a31c41
pg_mysqlpg_mysql/ at 1e631f9802c553dd9be3e87b
Babelfish extensionsbabelfish/babelfish_extensions/ at 99c35f5ebb80 plus ext-babelfish- patches 001, 004, 010, 011, 012, 013, 014891436a7f948

For pg_tde, prepare the indicated extension sources with subprojects/libkmip at 1bf36d7ecdb8, then run meson setup build -Dpg_config=/usr/mimus-19/bin/pg_config and meson install -C build in the extension directory. For Spock, put the matching bin directory first in PATH and run make PG_CONFIG=/usr/mimus-19/bin/pg_config followed by make PG_CONFIG=/usr/mimus-19/bin/pg_config install. Run the install step with write access to the target prefix.

2 - 100 / 101 · Percona TDE

Storage and WAL interfaces, startup checks and the matching backup client.

Percona storage changes

100 imports selected changes from Percona’s PostgreSQL 19 tree, including its TOAST fix. A pluggable storage manager, relation-file identity during rewrites, asynchronous I/O callbacks and WAL segment I/O hooks give pg_tde a place to encrypt and decrypt pages. The extension supplies tde_heap, key management and the WAL implementation. Percona PostgreSQL

Integration and compatibility

101 integrates callback registration and checks that the TDE storage, WAL and recovery methods are ready before replay on a marked directory. The matching backup client checks whether the source requires TDE-aware WAL handling. Using an older plain client can bypass this check. The paired pg_tde_waldump also identifies Spock’s subtransaction commit-time record in encrypted WAL. These interfaces affect extension builds even if every application table uses ordinary heap storage.

To choose which objects to encrypt and which backup tool to use, follow the PG TDE manual.

Index DDL on encrypted tables

In the four-change Babelfish and TDE candidate, 002-pg-tde-index-encryption.patch changes the DDL event handler in the pg_tde extension. A B-tree index reports btree in pg_am. The extension reads the index file’s encryption state when handling ALTER INDEX, including the internal ALTER that records the original name of an index created over TDS.

Acceptance covered enforcement both on and off. Encrypted indexes stayed encrypted after a fillfactor change, a tablespace move and REINDEX. Enforcement continued to reject parameter changes to a plaintext index. Existing indexes retain their own storage state. Check indexes moved with an older build individually by OID. Verify indexes and TOAST · Candidate build manifest

3 - 200 / 201 · Spock

Preserve old column values and commit metadata for conflict resolution and replay.

Upstream replication support

200 imports PG19 patches 015, 025, 030, 035 and 090 from Spock 5.0.15. The apply worker can use a column’s previous value to merge concurrent increments. When a conflicting local row wins but its numeric value must still change, the worker can write a new row version and preserve the original timestamp and origin. Upstream patch 030 added a separate CommitTs/SUBTRANS_TS WAL record (0x20) for this history. Spock PG19 patches

Recovery support

201 records the cluster requirement when CREATE EXTENSION spock succeeds. In r4, 201 writes the surviving subtransaction timestamp and origin overrides in the same WAL record as the transaction’s COMMIT. The matching kernel replays them even on a recovery instance without logical workers. Archives containing the earlier 0x20 record require their original recovery environment. Preloading the extension on the writable nodes enables replication. Before activating it, upgrade every physical standby and PITR environment that may have to replay a new record. Use pg_waldump for plaintext WAL or the paired pg_tde_waldump and keys for encrypted WAL.

For node setup, conflict handling and rollback decisions, see the Spock manual.

4 - 300 / 301 · MySQL

How the OpenHalo connection hooks and pg_mysql share the PostgreSQL backend.

300 imports the server-side changes selected from OpenHalo v19.0.0. Its protocol hooks let a preloaded module register a listener and drive the client handshake and command loop in a PostgreSQL backend. pg_mysql supplies the MySQL protocol and dialect. The native listener continues to speak PostgreSQL. OpenHalo

301 adapts protocol registration, type coercion, collation and foreign-key handling, and the server defaults. It checks for the registered MySQL callbacks on a cluster that depends on them. Use the matching pg_mysql build when starting or restoring that cluster. An application migration should exercise its actual driver and column types. Deploy a separate instance if TDS access is also required.

For application access and compatibility, see the MySQL manual.

5 - 400 / 401 · SQL Server

Babelfish parser and executor changes, the PostgreSQL 19.0 port and TDS integration.

400 imports native Babelfish changes selected against its PG19 beta base. They give the Babelfish extensions access to parser, executor, catalog, session and error-reporting paths needed for T-SQL. babelfishpg_tds handles the wire connection. babelfishpg_tsql, babelfishpg_common and babelfishpg_money provide the language and supporting types. Babelfish for PostgreSQL

401 completes the port to the 19.0 release. It reconciles listener and parser changes with OpenHalo, adds startup checks for dependent clusters and connects the Babelfish dump helpers to the Meson build. Use the complete pair to build the dump utilities. When migrating a database, verify SQL Server object naming, temporary tables and dump/restore on the chosen build. The cross-protocol row test covered a table defined on both nodes.

For connecting a TDS client and assessing T-SQL compatibility, see the SQL Server manual.

The current 401 also scopes a temporary union inside pg_bswap128() so that pgrx can generate Rust bindings from the installed PG19 headers. Regenerate bindings against the target Mimus SDK.

Four Babelfish and pg_tde changes

These four changes passed acceptance on a 19.0.1 candidate built on the frozen nine-patch baseline. Earlier baseline images share the version number. The tested Debian 13 x86-64 image ID starts with a3b80a5a99a1. Its /usr/mimus-19/share/mimus/increments.json records each patch’s SHA-256 and its input and output trees. The final kernel, Babelfish extension and pg_tde extension trees are a5c4770bf6b4, c97c68290e5d and 043d79f80d1c, respectively.

ChangeDelivered inWhat users see
1 · Table encryption optionBabelfish extension 001CREATE TABLE … WITH (ENCRYPTION=ON/OFF) fails before creating a table, preventing accidental delivery of a plaintext table as encrypted.
2 · Index DDL on encrypted tablespg_tde extension 002TDS can add an index with enforcement on. An encrypted index stays encrypted after PG changes its parameters, moves its tablespace or rebuilds it. Index patch
3 · Per-table selectionSQL example in the imageA dedicated TDS transaction creates the table and verifies its storage, two indexes, TOAST table and TOAST index before committing. Deploy and verify
4 · Temporary relation cleanupBabelfish extension 004 and kernel 402Statements and cursors release their own references. A cursor can finish reading a temporary relation after a procedure returns, with cleanup governed by the transaction outcome.

The release and assertion builds passed all four cases. Each read and updated seven existing permanent tables after a restart. The release build passed 245 native PG regression tests in each of six configurations. Item 5 is closed. The three T-SQL temporary objects use heap/off, and their relation files and query spills may contain plaintext. Temporary objects and storage coverage