diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index df8037b..d835775 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -5333,10 +5333,9 @@ BackgroundWorkerInitializeConnection(char *dbname, char *username) { BackgroundWorker *worker = MyBgworkerEntry; - /* XXX is this the right errcode? */ if (!(worker->bgw_flags & BGWORKER_BACKEND_DATABASE_CONNECTION)) ereport(FATAL, - (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("database connection requirement not indicated during registration"))); InitPostgres(dbname, InvalidOid, username, InvalidOid, NULL); @@ -5356,10 +5355,9 @@ BackgroundWorkerInitializeConnectionByOid(Oid dboid, Oid useroid) { BackgroundWorker *worker = MyBgworkerEntry; - /* XXX is this the right errcode? */ if (!(worker->bgw_flags & BGWORKER_BACKEND_DATABASE_CONNECTION)) ereport(FATAL, - (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("database connection requirement not indicated during registration"))); InitPostgres(NULL, dboid, NULL, useroid, NULL);