PostgreSQL reporting

Reporting and analytics on your live PostgreSQL database

Semavex connects to PostgreSQL directly, reads its schema and indexes, and gives your team saved reports, scheduled delivery and AI analysis without a warehouse in between. Vexon, the AI agent in Semavex, builds the semantic model and answers the questions.

What Semavex reads from PostgreSQL

  • Tables, columns, primary keys and foreign keys from the system catalog
  • Every index with its access method, uniqueness, partial-index predicate and covering (INCLUDE) columns
  • Row estimates and partition keys, so plans account for table size and partitioning
  • Column statistics from pg_stats, used to judge how selective a filter is

How reports stay out of your application's way

PostgreSQL's multiversion concurrency control means a read never blocks a write and never sees uncommitted data. Semavex sends no isolation setting to PostgreSQL: reports read committed data, and your application's transactions carry on as usual.

Each query runs with a time limit: 30 seconds for interactive questions and 120 seconds for scheduled reports.

Hot standbys and role settings

Semavex only reads, so a hot standby works as well as the primary: enter its host and port when you add the data source.

The last two lines of the script below are optional. default_transaction_read_only makes PostgreSQL refuse any write from the role, and statement_timeout caps each statement at 120 seconds on the server side. Semavex only issues read queries, so neither gets in its way.

Connect with a read-only account

Run this as an administrator, then enter the account when you add the data source in Semavex. Replace the values in angle brackets.

Read-only account for PostgreSQL
CREATE ROLE semavex_ro LOGIN PASSWORD '<strong password>';
GRANT CONNECT ON DATABASE <database> TO semavex_ro;
GRANT USAGE ON SCHEMA <schema> TO semavex_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema> TO semavex_ro;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema> GRANT SELECT ON TABLES TO semavex_ro;

-- Optional: refuse writes from this role and cap each statement
ALTER ROLE semavex_ro SET default_transaction_read_only = on;
ALTER ROLE semavex_ro SET statement_timeout = '120s';
Repeat the GRANT lines for each schema Semavex should see. ALTER DEFAULT PRIVILEGES covers tables created later by the role that runs it.

What your team gets on PostgreSQL

  • Saved reports with subtotals, grand totals, number formats and conditional formatting
  • Scheduled email delivery as PDF, CSV or Excel
  • Period comparisons, rolling periods, running totals, rankings and top-N
  • AI explanations from exact statistics over the whole result
  • Report chat: change a saved report by asking
  • Data alerts on your thresholds, as often as every 15 minutes (Enterprise)

Questions about PostgreSQL

Which PostgreSQL versions are supported?

Semavex is tested against PostgreSQL 16 on every build and reads the standard system catalog. Covering-index metadata needs PostgreSQL 11 or later.

Can we connect Semavex to a read replica?

Yes. Enter the replica's host and port when you add the data source. Semavex only reads, so a hot standby works as well as the primary.

Do partitioned tables work?

Yes. Semavex reads each table's partition key and takes it into account when it plans a query on a partitioned table.

See it on your data

See Semavex on your PostgreSQL database

Book a demo and we will walk through the semantic model, a few reports and a schedule on data like yours.

PostgreSQL Reporting Without a Data Warehouse - Semavex