Skip to content

smart_router

Experimental preload module for a fixed two-cluster query-cache demonstration

dbisFinal · Experimental preload module for a fixed two-cluster query-cache demonstration

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102066smart_routerdbisFinal1.0FEATC

Usage

Sources:

smart_router 1.0 is a research preload module for a fixed two-cluster cache demonstration. It is built inside the repository’s PostgreSQL tree. The install SQL contains no SQL objects; the official setup activates the module by preload, without a database-level extension creation step.

Enablement Boundary

shared_preload_libraries = 'smart_router'

A restart registers an executor hook and a schema-synchronization background worker. The supplied setup starts a remote cluster on port 6000 with database company_remote and a local cluster on port 6001. The source hardcodes the remote login as mradul and the worker’s local database as postgres; these are demonstration assumptions, not configurable routing APIs.

Behavior and Limits

The module fetches remote table definitions and data through libpq, populates local tables and tracks five table entries with an LRU policy. Executor hooks inspect query text and attempt remote or cached handling. There are no documented management functions or GUCs for changing the fixed connection and cache layout.

Use only disposable demonstration clusters and trusted input. Eviction issues DELETE against local tables, fetched values are concatenated into SQL without escaping, and the query recognizer is not a general SQL parser. Do not point the module at authoritative local tables or assume transparent routing, transaction consistency or safe multi-user operation. No license or stock PostgreSQL version compatibility is declared for this module.

Table reader