Registry / database / forerunner-postgres-store

forerunner-postgres-store

JSON →
library0.0.3jsnpmunverified

Postgres store plugin for the forerunner job queue library. Version 0.0.3, no recent updates (seems abandoned). Provides a simple way to persist job queues in PostgreSQL. Minimal documentation, no TypeScript types, no tests visible. Comparable to other job queue stores but less maintained.

npm install forerunner-postgres-store
INSTALL
IMPORT
SIG · FORERUNNER-POSTGRE
F
forerunner-postgres-store
databasejavascriptv0.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
var pgStore = require('forerunner-postgres-store');
import pgStore from 'forerunner-postgres-store';
CommonJS only; no ESM support. Must use require().
PgStore
var PgStore = require('forerunner-postgres-store');
The function returned is the constructor; often used as a class.
pgStore (instantiated)
var store = new pgStore(dbOpts, callback);
var store = pgStore(dbOpts);
Constructor must be called with new and a callback.

Shows how to instantiate the Postgres store and start forerunner with it.

var pgStore = require('forerunner-postgres-store'); var forerunner = require('forerunner'); var dbOpts = { db: { user: 'user', password: process.env.DB_PASS || 'pass', database: 'database' }, tableName: 'job_store' }; var store = new pgStore(dbOpts, function(err) { if (err) { console.error(err); return; } var forerunnerOpts = { store: store }; forerunner.start(forerunnerOpts, function() { console.log('Forerunner started with Postgres store'); }); });
Debug
Known issues
deprecatedPackage appears abandoned; no updates since 2013. May have security vulnerabilities in transitive dependencies.
fix
Consider using an alternative like pg-boss or bull with Postgres.
affects: >=0.0.0
breakingNo support for modern PostgreSQL connection string (e.g., postgres://). Only supports object config with user/password/database.
fix
Provide database config as object, not connection URI.
affects: 0.0.3
gotchaConstructor expects a callback; if omitted, table creation may not complete before forerunner starts.
fix
Always provide a callback and start forerunner inside it.
affects: 0.0.3
deprecatedUses deprecated 'pg' library patterns (e.g., pg.connect). Modern pg versions may cause warnings.
fix
Pin pg to an older version (e.g., 4.x) or migrate to a maintained store.
affects: 0.0.3
gotchaTable is not auto-created; you must run the SQL from utils/ manually.
fix
Run the SQL script provided in the package's utils/ folder before using.
affects: 0.0.3
Errors
Common errors & fixes
Cannot find module 'forerunner'
forerunner is a peer dependency; not installed automatically.
fix
npm install forerunner forerunner-postgres-store
TypeError: store is not a constructor
Missing 'new' keyword when instantiating pgStore.
fix
var store = new pgStore(dbOpts, callback);
Error: connect ECONNREFUSED
PostgreSQL not running or connection config wrong.
fix
Ensure PostgreSQL is running on localhost:5432 and credentials are correct.
error: relation "job_store" does not exist
Table not created in database.
fix
Run the SQL from node_modules/forerunner-postgres-store/utils/ to create the table.
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies
forerunnerrequiredpeer dependency; this is a plugin for the forerunner job queue library
pgrequiredPostgreSQL client for Node.js
Agent activity
7 hits · last 30 days
node
6
Resources
forerunner-postgres-store — npm install forerunner-postgres-store · libregistry