Database Setup¶
PGQueuer requires initial setup in your PostgreSQL database: tables, triggers, and functions for job queuing and processing.
Table Structure¶
PGQueuer uses three primary tables:
pgqueuer— the active job queuepgqueuer_log— job statistics and historypgqueuer_schedules— recurring schedule definitions
Installation¶
Install PgQueuer schema via the CLI. Make sure your PostgreSQL environment variables
(PGHOST, PGUSER, PGPASSWORD, PGDATABASE) are set, or use flags to specify credentials:
To see what SQL will be executed without applying it:
Uninstallation¶
Upgrades¶
Apply schema migrations after upgrading PgQueuer:
Verification¶
Check that all required objects exist:
Check that the schema has been removed:
The command exits with code 1 if any mismatches are detected.
Adjusting Durability¶
PgQueuer tables are installed with durable settings by default. You can select a different durability level at install time:
Or change the durability of existing tables without data loss:
See CLI Reference for full details on volatile, balanced, and durable modes.
Autovacuum Optimization¶
After installation, tune PostgreSQL autovacuum settings for PgQueuer tables:
This applies recommended values that reduce bloat on the queue while keeping the log table mostly append-only. Reset to system defaults with: