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.
Connection requests
Each connection is served by a backend process.
Shared and local memory
Working state shared across processes and private to each process.
Database processes
WAL Writer · Background Writer · Checkpointer · Autovacuum · Statistics Collector.
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
| Requested level | Documented Halo behavior | Design implication |
|---|---|---|
| Read Uncommitted | Handled as Read Committed under MVCC | Do not expect dirty-read behavior |
| Read Committed | Default isolation | Each statement works from committed visibility |
| Repeatable Read | Stable transactional view with stricter conflict handling | Use when repeatable reads matter |
| Serializable | Strongest documented isolation | Applications 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.
Ordered boundaries
Time, numeric, or other ordered ranges.
Named categories
Regions, classes, or discrete values.
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
Transaction change
Data and index work begins in the transactional engine.
WAL record
The change is represented in write-ahead logging.
Data pages
Rows are stored in 8 KB pages.
Checkpoint and archive
Background writing, checkpoints, archiving, and backup shape recovery.
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.