PostgreSQL
Installation
Section titled “Installation”dotnet add package Surefire.PostgreSqlbuilder.Services.AddSurefire(options =>{ options.UsePostgreSql("Host=localhost;Database=myapp");});This registers both the job store and notification provider. Real-time notifications use PostgreSQL’s LISTEN/NOTIFY, so workers pick up new jobs immediately instead of waiting for the next poll.
Schema
Section titled “Schema”With AutoMigrate enabled (the default), Surefire creates the required PostgreSQL tables automatically.
The current provider uses the built-in surefire_* table names.
Store and notifications separately
Section titled “Store and notifications separately”In some setups you may want separate connections for the store and notification provider. For example, if you use PgBouncer in transaction mode for the store but need a direct connection for LISTEN/NOTIFY:
options.UsePostgreSqlStore("Host=pgbouncer;Database=myapp");options.UsePostgreSqlNotifications("Host=primary;Database=myapp");The PostgreSQL provider supports all Surefire features.