ProficientNowTechRFCs
Product RFCs/Db ops/RFC DBOPS 0001

4. System Components

RFC-DBOPS-0001                                                    Section 4
Category: Standards Track                              System Components

4. System Components

← 3. Architecture | Index | Next: 5. Upgrade Mechanics →


4.1 PostgreSQL Image Build

AspectDescription
ResponsibilityProduces the PostgreSQL runtime image used by metadata and tenant databases
ExtensionsPackages pg_cron; AGE, pgvector, and pg_net have been removed from the container image
InterfacesExposes the PostgreSQL server binary and extension shared objects
Failure ModesExtension ABI mismatch prevents server start; missing extension packages block preloads

4.2 Metadata Database Container (db)

AspectDescription
ResponsibilityHosts platform metadata for ATS services
BaselineEnforces PostgreSQL 18 baseline and shared extension availability
InterfacesSQL protocol via PgBouncer transaction and session poolers
Failure ModesUpgrade failure leaves the container on an unsupported baseline; schema migration tools fail when session pooling is unavailable

4.3 Tenant Database Container (tenant_db)

AspectDescription
ResponsibilityHosts tenant data and enables logical decoding for CDC
ConfigurationApplies configuration that must persist across the major upgrade (wal_level, password encryption)
InterfacesSQL protocol via PgBouncer; logical decoding stream for Debezium
Failure ModesLogical decoding incompatibility disrupts CDC; configuration drift disables wal_level or preloads

4.4 PgBouncer Transaction Pooler

AspectDescription
ResponsibilityProvides high-concurrency transaction pooling for application workloads
InterfacesPostgreSQL protocol proxy for short-lived transactions
Failure ModesPooler compatibility issues with PostgreSQL 18 lead to connection churn; authentication misalignment blocks application access

4.5 PgBouncer Session Pooler

AspectDescription
ResponsibilityProvides session pooling for migration and administrative workflows
InterfacesPostgreSQL protocol proxy with session persistence
Failure ModesSession state regressions break migrations or tooling that relies on prepared statements

4.6 Debezium Connect

AspectDescription
ResponsibilityConsumes logical decoding from the tenant database and publishes change events
InterfacesPostgreSQL logical decoding protocol via replication slots
Failure ModesPlugin or protocol incompatibility halts CDC; replication slot resets or invalidation during upgrade cause data gaps

4.7 Schema Migration Tooling (Prisma and Atlas)

AspectDescription
ResponsibilityApplies and validates schema changes across metadata and tenant databases
InterfacesSession pooler connections for migrations and schema validation
Failure ModesTooling incompatibility with PostgreSQL 18 prevents schema evolution; shadow database workflows fail due to extension mismatches

4.7.1 Prisma Baselining Requirement

The Prisma migration history contains CREATE EXTENSION statements for Apache AGE, pgvector, and pg_net in the initial migration files. These extensions were present in the older container configuration but have since been removed.

When Prisma is baselined against the PostgreSQL 18 container, the baselining process reconciles the recorded migration history with the actual database state. Because the new container does not include AGE, pgvector, or pg_net, the baselined migration history no longer contains CREATE EXTENSION statements for these removed extensions.

This baselining MUST be performed as part of the upgrade to ensure that the migration tooling accurately reflects the extension surface of the containerized stack. See Section 5.6 for the architectural constraints governing this process.


4.8 Extension Ecosystem

AspectDescription
ResponsibilityProvides PostgreSQL extensions required by platform features
Activepg_cron (scheduled job execution inside the database server)
RemovedApache AGE, pgvector, and pg_net have been removed from the container image and are no longer part of the extension surface
InterfacesExtension shared libraries loaded by PostgreSQL at startup or on demand
Failure ModesExtension unavailability or incompatible builds prevent database startup or feature use

Document Navigation


End of Section 4