pg_accumulator
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_accumulator | 1.1.3 | FUNC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4845 | pg_accumulator | No | Yes | No | Yes | No | No | accum |
| Related | plpgsql currency financial omni_ledger |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1.3 | 1817161514 | pg_accumulator | plpgsql |
| RPM | PIGSTY | 1.1.3 | 1817161514 | pg_accumulator_$v | - |
| DEB | PIGSTY | 1.1.3 | 1817161514 | postgresql-$v-pg-accumulator | - |
Build
You can build the RPM / DEB packages for pg_accumulator using pig build:
Install
You can install pg_accumulator directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources: README, documentation, control file
pg_accumulator implements declarative accumulation registers for PostgreSQL. A register records movements across arbitrary dimensions and resources, then exposes generated functions for balances, turnovers, movement history, verification, and rebuild operations.
Enable
For high-write workloads that use the delta buffer and background worker, preload the library and restart PostgreSQL:
Create A Register
The call creates the register metadata, movement table, total tables, balance cache, triggers, generated query functions, and supporting indexes.
Post And Query Movements
Corrections And Maintenance
Use register_unpost and register_repost for retroactive corrections. Use register_verify, register_rebuild_totals, and register_rebuild_cache to check and repair derived state when needed.
Configuration
The documented GUCs include pg_accumulator.background_workers, pg_accumulator.delta_merge_interval, pg_accumulator.delta_merge_delay, pg_accumulator.delta_merge_batch_size, pg_accumulator.partitions_ahead, and pg_accumulator.maintenance_interval.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)