Igloo/Documentation/Connect PostgreSQL
Browse documentation

Start here

Connect PostgreSQL

Configure live sources and query them through the PostgreSQL wire protocol.

Prepare a PostgreSQL source

Have a reachable development PostgreSQL database and a PostgreSQL client such as psql. Create a small table in your own test database, or use an existing base table. Igloo discovers base tables in the configured schemas; views are skipped.

Run in your development PostgreSQL database
CREATE TABLE public.customers (
  id BIGINT PRIMARY KEY,
  name TEXT
);
INSERT INTO public.customers VALUES (1, 'Alex'), (2, 'Sam');

Configure the engine

Save the following as igloo.toml. In the connector preview, native PostgreSQL does not require dummy Parquet or CDC directories. If you add the optional legacy parquet_path, that directory must exist.

When configured, the legacy iceberg table reads .parquet files with user_id: Int64 (non-null) and data: Utf8. Named parquet_sources infer general schemas; see Database connectors. Keep the OHLCV demo separate from the legacy path.

igloo.toml
listen_addr = "127.0.0.1:5442"

[[sources]]
name = "app"
schemas = ["public"]
# Supply the URI with IGLOO_SOURCE_APP_URI.

Start the SQL server

Set the source URI to your development database. Environment variables override file values. The serve command initializes the catalogs, result cache, and background CDC polling loop. Unlike plain cargo run, serve does not execute the standalone ADBC smoke test.

Terminal · from the engine checkout
export IGLOO_SOURCE_APP_URI='postgres://USER:PASSWORD@localhost:5432/DATABASE'
cargo run --locked -- serve

Connect with psql

In another terminal, use the configured port to connect to Igloo. Canonical table names contain the source, schema, and table. SHOW TABLES and information_schema expose the federated catalog.

Terminal
psql -h 127.0.0.1 -p 5442 -U igloo -d igloo \
  -c 'SELECT * FROM app.public.customers;'

psql -h 127.0.0.1 -p 5442 -U igloo -d igloo \
  -c 'SHOW TABLES;'

Grounded in the engine source at connector preview b5a210d (unreleased) . The quickstart pins this experimental source revision; it is not a tagged release.

Suggest an improvement