Install and initialize
Check the installation
Use a Linux installation of the matching Mimus kernel and extensions. The PostgreSQL 19 version string alone cannot identify the patched ABI. If building from source, compile the complete kernel with ICU, OpenSSL, libxml2 and libuuid support, install its contrib/uuid-ossp, then build the four Babelfish modules against that installation’s pg_config and its matching PG_SRC. The T-SQL parser uses Java, CMake and the ANTLR 4.13.2 C++ runtime. The isolated upstream port and the Mimus build use different TDS interfaces. Upstream build dependencies
| Extension | SQL version | What it installs or provides |
|---|---|---|
babelfishpg_common | 7.0.0 | SQL Server types, casts and collations in sys. Its control file declares no extension dependencies, but its monetary functions load the money shared library. |
babelfishpg_tsql | 7.0.0 | T-SQL parser, procedural language, functions, system catalogs and initialization. Requires babelfishpg_common and uuid-ossp. |
babelfishpg_tds | 1.0.0 | TDS listener, login and packets. Preload the library at startup, then create the SQL extension in the target database. Requires babelfishpg_tsql. |
babelfishpg_money | 1.1.0 | Standalone fixed-decimal monetary extension. The tested installation creates it explicitly, outside the TDS dependency chain. |
Start an empty instance
These commands assume a fresh, isolated Linux host or container with ports 5432 and 1433 available. In the shell, run as the OS account postgres. Put the Mimus bin directory first in PATH. Keep this shell for the rest of the guide so PGHOST selects the private Unix socket. The final command should report server started.
Configure the target through psql
Connect to the PostgreSQL endpoint as cluster superuser postgres. In the listing below, the first line opens interactive psql. Run the SQL and backslash commands at its prompt. Enter a new password twice at \password and keep it for the TDS login.
Expect ALTER SYSTEM, CREATE ROLE, CREATE DATABASE and ALTER DATABASE. The bbf_admin login owns the physical database and becomes the initial T-SQL administrator. The example ran with rolsuper = false. Give applications their own logins and database users. The preload list here is for an empty instance. On a configured cluster, retain its existing required libraries when adding babelfishpg_tds.
As the OS account postgres, put this entry before the general host rules in $PGDATA/pg_hba.conf. The database field is the physical database wire. This password-only, loopback rule is for the local exercise. For a remote client use TLS with certificate validation.
Restart this instance as its OS owner. Restart loads the TDS library and binds the ports. A reload alone cannot apply either change. A fresh connection to wire also picks up its database-level migration mode. Choose the mode before initialization. Mapping in each mode
Initialize the physical database once
In the new psql session as PG superuser postgres in wire, run the following commands. The three settings should read babelfishpg_tds, wire and single-db. The installation setting applies only to this session. CASCADE installs the three declared dependencies. The final query should list the four versions above plus uuid-ossp 1.1.
CALL creates cluster roles and the built-in logical databases master, tempdb and msdb. Its argument must name the physical database owner. Once it succeeds, connect using bbf_admin on the TDS port. First TDS connection · Upstream initialization procedure
Build from paired source checkouts
The two tree checks here reproduce the earlier connection example. For the TDS encryption guides, use the paired sources with the kernel, Babelfish and pg_tde increments. Identify the four-change candidate
If the server and modules are already installed, start at the empty instance. Otherwise run this in a build-user shell with writable, clean checkouts of the indicated trees and a fresh install prefix. Replace all three paths. Install the development dependencies above plus GNU make, a C/C++17 toolchain, Bison, Flex and the ANTLR runtime under /usr/local first. The tree checks exit silently on a match. At the end, the prefix contains the server, PGXS and extension files. Make that prefix and the runtime libraries accessible to the server OS account.