From a Postgres cluster to a hybrid lakehouse: Iceberg and Trino vs. the Oracle routes, for federal and air-gapped sites
A common request in federal shops goes like this: "Our Postgres cluster has ten years of history in it, the analysts are hammering the primary, and the cloud team wants a data lake. Can we turn Postgres into a lakehouse that runs on-prem and in GovCloud?" The other half of the conversation is usually "or do we just go to Oracle on Exadata?"
The second option is a bigger move than it sounds. Exadata runs Oracle Database and nothing else, so you can't put your Postgres cluster on it. The Oracle route means either migrating the applications to Oracle Database or keeping Postgres and feeding a separate Oracle warehouse from it. Both questions are fair, and both start from a couple of assumptions worth fixing first.
First, what you're actually building
You don't turn Postgres into a lakehouse. Postgres (or Oracle) remains your system of record: transactions, constraints, the thing the applications write to. The lakehouse sits beside it and holds a copy of the data in open files that many engines can read. The first advantage is that the 40-table report joining five years of history stops running on your primary. It's also smaller and faster for analytics, and it can cost less, though not always (see Cost below).
The open-source stack splits the work into separate jobs, and each tool does one of them. They aren't alternatives to each other:
| Job | Tool | What it does |
|---|---|---|
| Capture changes (Postgres) | Debezium, on Kafka Connect | Reads Postgres logical replication (WAL) and turns every insert, update and delete into an event |
| Capture changes (Oracle) | Debezium Oracle connector, on Kafka Connect (or GoldenGate, if you already own it) | Reads Oracle redo and archive logs (Debezium through LogMiner) and turns every insert, update and delete into an event |
| Move them | Apache Kafka | Durable, replayable log between the database and everything downstream |
| Store tables | Apache Iceberg, on object storage | An open table format: Parquet files plus metadata that gives you snapshots, schema changes and time travel |
| Track tables | An Iceberg catalog (REST catalog such as Apache Polaris, Nessie or Lakekeeper; or Hive Metastore) | Knows which metadata file is the current version of each table |
| Query | Trino | Distributed SQL engine that reads Iceberg and can also query Postgres/Oracle live |
| Transform | dbt | Versioned SQL models that turn raw change tables into clean, tested reporting tables |
So "Iceberg plus Trino, or dbt, or Kafka" is really "Kafka and Debezium to get data in, Iceberg to hold it, Trino to query it, dbt to shape it." You can skip Kafka for a small system, but you don't pick it instead of Trino.
The data path looks like this:
Postgres (primary) --WAL--> Debezium --> Kafka --> Iceberg sink --> Iceberg tables
(object storage)
|
dbt models (run through Trino) <----+
|
Analysts / BI --> Trino ------------+
\--> Postgres (live lookups)
The Apache Iceberg project ships a Kafka Connect sink that commits change events to Iceberg tables, so this pipeline is all Apache-licensed parts.
Lighter options
If you don't need streaming, there are simpler ways in:
- Nightly or hourly batch. Export partitions to Parquet and register them as Iceberg tables. Fine for history that doesn't change.
- Postgres extensions. pg_lake (open-sourced in late 2025, Apache 2.0) lets Postgres itself create, write and query Iceberg tables. One fewer cluster to run, but your Postgres server now does lake work too.
- Trino federation only. Point Trino's PostgreSQL connector at a replica and join it with files. No copy at all, but every query still lands on a database.
The DBA part nobody puts on the architecture slide
Debezium reads from a logical replication slot, and a slot holds WAL until the consumer confirms it. If Kafka Connect is down over a long weekend, WAL piles up in pg_wal until the disk fills and the primary stops. On a SCIF network, where the person who can fix Kafka might not be on site until Monday, that's the failure you plan for first:
SELECT slot_name, active,
pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn)) AS behind
FROM pg_replication_slots
WHERE slot_type = 'logical';
Alert on that number. On PostgreSQL 13 and later, set max_slot_wal_keep_size so a dead consumer costs you a re-snapshot instead of an outage.
Other things that hurt:
- Primary keys. CDC needs them to turn updates into upserts. Tables without one need
REPLICA IDENTITY FULL, which makes every update log the whole old row. - Small files. Streaming commits create lots of small Parquet files. Schedule Iceberg compaction and snapshot expiry, or Trino gets slower every week.
- Schema changes. Debezium carries column adds through. Renames and type changes need a plan, and dbt tests are where you catch them.
Where "hybrid" gets complicated in federal
On a commercial site, hybrid means the same Iceberg tables are readable from on-prem Trino and from a cloud engine, because they're just files on S3-compatible storage. In federal it depends on the classification of the data:
- Unclassified and CUI. True hybrid is possible: on-prem object storage plus a cloud region authorized for your level (AWS GovCloud, Azure Government, Google's public sector offerings, OCI Government). Trino can have a catalog for each.
- Classified or air-gapped. There is no live hybrid. The high side gets its own complete stack, and data moves through an approved cross-domain process. Iceberg helps here because a table is a set of files plus metadata, so a snapshot can be packaged, reviewed and moved as a unit.
Some compliance points that get blurred in sales decks:
- FedRAMP covers cloud services, not software you run. Trino on your own Kubernetes cluster isn't "FedRAMP authorized." It inherits controls from the platform it runs on and goes into your system's ATO under the RMF. Classified systems are authorized under ICD 503 instead.
- STIGs. DISA publishes a PostgreSQL STIG, and Crunchy Data and EDB have vendor STIGs for their Postgres distributions. Oracle Database has its own STIG. I couldn't find a product-specific STIG for Trino, Kafka, Iceberg or dbt, so those are assessed against the general application and container SRGs plus the STIGs for the OS and Kubernetes underneath.
- Hardened images. DoD's Iron Bank has hardened images for PostgreSQL (versions 15 through 18), Trino, Strimzi Kafka and Confluent Platform. Check the current tag before you plan around any of them, because images get archived when nobody maintains them.
- FIPS. Everything here is Java or C. FIPS 140 mode is a configuration project (a FIPS-validated provider for the JVMs, OpenSSL in FIPS mode for Postgres), not a checkbox. Budget time for it.
Object storage on-prem
The lake needs S3-compatible storage. For years the default answer was MinIO, but its community edition stopped shipping prebuilt binaries and images in October 2025, went into maintenance mode that December, and the repository was archived in 2026. For a new build, look at Ceph RGW (mature, needs real expertise), a storage array with a native S3 interface, or a supported commercial object store. Whatever you pick, make sure someone can patch it for the life of the ATO.
The Oracle routes, fairly
"Oracle means cloud-only warehousing or an expensive Exadata" isn't the whole picture. Oracle has more on-prem and federal options than most people assume. One thing doesn't change across all of them: every option below runs Oracle Database only. For a Postgres shop that means one of two paths:
- Migrate. Move the applications from Postgres to Oracle Database: schema, PL/pgSQL to PL/SQL, drivers, testing. One engine afterwards, but a significant effort.
- Feed a separate Oracle warehouse. Keep Postgres for the applications and replicate into Oracle (Oracle GoldenGate can capture from PostgreSQL). That's the same "pipeline beside the database" shape as the open lakehouse, with Oracle at the end of it.
Where it can run:
- Exadata on-prem. You buy the engineered system and run it in your data center. Fully disconnected is possible.
- Exadata Cloud@Customer. Oracle-managed Exadata hardware in your data center, billed like cloud. In March 2026 Oracle announced it authorized at FedRAMP High (Oracle US Government Cloud) and DISA IL5 (Oracle US Defense Cloud). Autonomous Database can run on Cloud@Customer too.
- OCI government regions. Oracle says its US Defense Cloud is authorized for IL2, IL4 and IL5, and its air-gapped National Security Regions are IL6 for Secret and Top Secret work.
- Iceberg support. Autonomous Database can query Iceberg tables as external tables, and Oracle's Autonomous AI Lakehouse (announced October 2025) adds catalog integrations. As of this writing, Oracle's docs for dedicated infrastructure list real limits: partitioned Iceberg tables aren't supported, merge-on-read deletes cause queries to fail, and the catalogs named are AWS Glue and Hadoop-style catalogs. Test with your own tables before you assume Oracle can read what your Kafka sink writes.
So the honest framing isn't "open source on-prem vs. Oracle in the cloud." Both can run in your building, both can run in an authorized government cloud, and both can read Iceberg. The real differences are cost, who runs it, and how much you depend on one vendor.
Already on Oracle? Keep it as the system of record and offload the analytics
The open lakehouse doesn't need Postgres at all. If Oracle is your system of record and the reporting/analytics load is what's pushing you toward more cores or a new Exadata, you can leave Oracle exactly where it is and move only the analytics out.
To be clear about what "the lake" is here: it's Iceberg tables on object storage, queried by Trino. It isn't a Postgres database. Postgres shows up in this picture only as one more source, or as a small serving database for an app that needs a few aggregates with low latency.
The pipeline has the same shape as before, with a different first step:
Oracle (system of record) --redo--> Debezium or GoldenGate --> Kafka --> Iceberg tables
|
Analysts / BI --> Trino ----------------------------+
\--> Oracle (live lookups, sparingly)
Capture. Two realistic options:
- Debezium's Oracle connector. Open source, and by default it reads changes through LogMiner, which ships with Oracle Database at no extra cost. It also has an OpenLogReplicator adapter and an XStream adapter. XStream is the one to be careful with: Oracle's licensing docs say XStream comes with a GoldenGate license (on top of Enterprise Edition), so don't pick that adapter unless you already own GoldenGate.
- Oracle GoldenGate. If the agency already licenses it, it's the most mature way to stream Oracle changes, and it can deliver to Kafka and to Iceberg targets. If you don't own it, it's a significant new line item.
Query. Trino reads the Iceberg copy for the heavy work. Its Oracle connector can also join live Oracle tables when someone truly needs the last few seconds of data. Use that sparingly, because every federated query lands back on the database you were trying to protect. If you point it at a standby instead, remember that opening a physical standby read-only while it applies redo is Active Data Guard, which is a separately licensed option.
The win. Month-end reports, ad hoc analyst queries and data science extracts stop competing with transactions. On a per-core license, analytics you don't run on Oracle are cores you don't have to buy, and that can be the difference between tuning the box you have and buying a bigger one.
What to plan for:
- Supplemental logging. LogMiner-based capture needs the database in ARCHIVELOG mode and supplemental logging turned on (minimal at the database level, plus all columns, or at least the keys, on each captured table). That adds redo, sometimes a lot on wide, update-heavy tables. Measure redo generation before and after on a test system, and size archive log storage and retention to match.
- A privileged capture user. The connector account needs grants like LOGMINING, SELECT ANY TRANSACTION, FLASHBACK ANY TABLE and the catalog roles. Several of those will light up an Oracle Database STIG review, so write the justification up front and keep the account locked to the capture host.
- ATO review. A new outbound data flow from the system of record to a new system is a change your ISSO will want documented: boundary diagrams, data categorization of the lake (it holds the same CUI or classified data as the source), and who can query it.
- LogMiner limits. Very large transactions have to be buffered until commit, and LogMiner's throughput has a ceiling on very busy databases. Test with your real peak redo rate, not an average day.
- Your DBAs own it. When capture falls behind, the symptoms (archive logs piling up, LogMiner sessions using PGA) show up on the Oracle side first. Make sure the Oracle team monitors the capture session like any other production workload.
Cost: compare the whole bill
Exadata is expensive. Oracle Enterprise Edition is licensed per processor core, the options you'll want for a warehouse (Partitioning, Advanced Compression, often RAC) are extra, and support runs about 22% of the license price every year. Cloud@Customer turns that into a subscription, but it isn't cheap either. And for a Postgres shop, add the migration: moving applications to Oracle Database costs developer time, testing and risk, and that belongs in the Oracle column too.
The open stack has no license fee, and that's where a lot of comparisons stop. They shouldn't. Count:
- People. Kafka, Kafka Connect, Trino, a catalog, object storage and compaction jobs are five or six distributed systems. Someone has to patch, upgrade, tune and be on call for each. On a cleared site, that someone needs a clearance, and cleared platform engineers are neither cheap nor easy to hire.
- Hardening and ATO. Every component goes through scans, STIG or SRG checklists and continuous monitoring. With Exadata, a lot of that evidence comes from one vendor.
- Support contracts. Most agencies won't run production on community support. Commercial support for Trino, Kafka and Postgres costs money, just less of it.
- Time. An engineered system is running in weeks. A well-run open lakehouse takes months to get production-grade.
Where open source clearly wins:
- Lock-in. Iceberg files on your storage can be read by Trino, Spark, Flink, DuckDB and, yes, Oracle. If the contract changes, the data doesn't have to move.
- Air-gap fit. Everything is source-available and can be built, scanned and mirrored inside the enclave. No license server, no phone-home.
- Scale cost. Adding storage is adding disks, not cores to license.
Where Oracle clearly wins:
- One throat to choke, and one set of STIG and ATO evidence.
- Mixed workloads on one engine, if you migrate. Once the applications are on Oracle Database, Exadata runs OLTP and analytics side by side without a pipeline in the middle, and there's no CDC lag. If you keep Postgres and feed Oracle, you're back to running a pipeline.
- Existing skills. If your team is Oracle DBAs, retraining them on five distributed systems is a real cost.
A rough way to decide
- Mostly Postgres, a team comfortable with Kubernetes, multiple consumers of the data, and a strong reason to avoid lock-in: the open lakehouse is a good fit. Start with batch Iceberg loads and Trino, and add Debezium and Kafka when someone actually needs fresher data.
- Already an Oracle shop (or willing to migrate the Postgres applications), a small team, and a need for an authorized platform this fiscal year: Exadata Cloud@Customer or an OCI government region will likely cost less in total than staffing an open stack, even after licenses.
- Oracle as the system of record, with reporting load driving a hardware or license purchase: keep Oracle, stream changes out with Debezium (LogMiner) or the GoldenGate you already own, and put the analysts on Trino and Iceberg.
- Classified and disconnected: either works, but price in the patching. A stack you can't keep current inside the enclave is a finding waiting to happen.
Whichever way you go, keep watching the source database. The lake moves the reporting load off the primary, but the replication slot, the long-running export or the "temporary" ad hoc connection is what usually takes it down.
If you've built a lakehouse in a disconnected environment, I'd like to hear how you handled the cross-domain step and compaction. Those are the two parts nobody seems to write down.
Brett Rosenblatt is a DBA and performance engineer and a co-founder of Bandlei, which makes ReinDB, a read-only performance monitor for PostgreSQL, Oracle and other databases.