ARCHITECTURE & CORE TECHNOLOGY

Understand the database beneath the compatibility layer.

Memory, backend and background processes coordinate transactional work. WAL, checkpoints, storage pages, indexes, partitions, and maintenance processes manage the persistent cluster below.

Inside a Halo deployment

An instance is the active memory-and-process environment. A cluster is the persistent collection of databases and supporting files managed by it.

CLIENTS

Connection requests

Each connection is served by a backend process.

INSTANCE

Shared and local memory

Working state shared across processes and private to each process.

BACKGROUND

Database processes

WAL Writer · Background Writer · Checkpointer · Autovacuum · Statistics Collector.

PERSISTENT CLUSTER

Multiple databases and files

Data files · WAL · auxiliary files.

One cluster can contain multiple independent databases. This is not, by itself, a claim about a particular tenant-isolation model.

Transaction behavior is explicit

Halo supports implicit and explicit transactions, savepoints, commit, and rollback. MVCC lets readers and writers proceed concurrently while the selected isolation level determines which committed changes a transaction can observe.

Isolation levels

Isolation levels
Requested levelDocumented Halo behaviorDesign implication
Read UncommittedHandled as Read Committed under MVCCDo not expect dirty-read behavior
Read CommittedDefault isolationEach statement works from committed visibility
Repeatable ReadStable transactional view with stricter conflict handlingUse when repeatable reads matter
SerializableStrongest documented isolationApplications must retry serialization failures

Indexes for different access patterns

Halo exposes six core index methods and several design variants. The right method depends on data shape, operators, ordering, and write cost.

B-treeEquality, range, and order

The default general-purpose method for equality and ordered range access.

  • multicolumn
  • unique
  • sort order
  • expression
  • partial
  • covering
HashEquality

An equality-oriented access method for supported operator classes.

GiST and SP-GiSTSpecialized structures

Operator-class-driven methods for specialized data, search, and in some cases nearest-neighbor access.

  • GiST
  • SP-GiST
  • nearest neighbor
GINValues with searchable components

An inverted index suited to composite values such as full-text and JSONB. GIN does not provide index-only scans.

BRINLarge physically correlated tables

Compact block-range summaries for tables whose values correlate with physical order.

Design trade-offsReads, writes, and storage

Broader indexes can improve selected reads while increasing write work and storage. Partial indexes depend on predicates the planner can prove; covering payloads also add size.

Partition by lifecycle and access pattern

Halo documents range, list, hash, and multilevel partitioning, with pruning and attach, detach, and rename lifecycle operations.

RANGE

Ordered boundaries

Time, numeric, or other ordered ranges.

LIST

Named categories

Regions, classes, or discrete values.

HASH

Key buckets

Remainder-based distribution across defined partitions.

Multilevel designs can combine methods. Partitioning is a physical design choice, not an automatic performance guarantee; key selection and predicates determine whether pruning is effective.

A broad database object model

Data and presentation

Tables, foreign tables, ordinary views, materialized views, sequences, constraints, comments, and generated stored columns. Ordinary views reflect current source data; materialized views persist query results and trade freshness for an explicit refresh lifecycle.

  • tables
  • views
  • materialized views
  • sequences
  • constraints
Logic and extensibility

Functions, procedures, triggers, custom types, operators, operator classes and families, languages, collations, conversions, and extensions.

  • functions
  • procedures
  • triggers
  • types
  • operators
Security and governance

Roles, privileges, default access controls, row-level policies, security labels, and optional SELinux-linked controls for supported operations.

Integration and replication

Foreign-data wrappers, servers and user mappings, publications and subscriptions, replication origins and slots, and LISTEN/NOTIFY event primitives.

Compatibility objects

Packages, package/type bodies, synonyms, directories, database links, global temporary tables, recycle-bin metadata, and query mapping extend the object model for migration work.

Storage, durability, and maintenance work together

1

Transaction change

Data and index work begins in the transactional engine.

2

WAL record

The change is represented in write-ahead logging.

3

Data pages

Rows are stored in 8 KB pages.

4

Checkpoint and archive

Background writing, checkpoints, archiving, and backup shape recovery.

5

Ongoing maintenance

Autovacuum and statistics maintain visibility and planning information.

Durability and recovery outcomes depend on WAL, checkpoint, archive, backup, and replication settings chosen for the deployment.

Connect the core architecture to the workload.

Review the mode, transaction, data-model, index, partition, and recovery assumptions that matter to your application.