Allow background workers to connect using OIDs rather than names.
If the username and database name are being taken from a string,
perhaps a GUC, the existing BackgroundWorkerInitializeConnection()
interface works well; however, in some cases, we may want a worker
to connect to the same database as the same user as some existing
session. In such cases, it's better to specify the connection
information using OIDs. This patch adds a new function called
BackgroundWorkerInitializeConnectionByOid for that purpose.
Patch by me, reviewed by Andres Freund.