1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

Add new function BackgroundWorkerInitializeConnectionByOid.

Sometimes it's useful for a background worker to be able to initialize
its database connection by OID rather than by name, so provide a way
to do that.
This commit is contained in:
Robert Haas
2015-02-02 16:23:59 -05:00
parent 2488eff889
commit 5d2f957f3f
9 changed files with 56 additions and 22 deletions

View File

@ -3714,7 +3714,7 @@ PostgresMain(int argc, char *argv[],
* it inside InitPostgres() instead. In particular, anything that
* involves database access should be there, not here.
*/
InitPostgres(dbname, InvalidOid, username, NULL);
InitPostgres(dbname, InvalidOid, username, InvalidOid, NULL);
/*
* If the PostmasterContext is still around, recycle the space; we don't