BackgroundWorkerInitializeConnection(NULL, ...) doesn't work
От | Andrew Tipton |
---|---|
Тема | BackgroundWorkerInitializeConnection(NULL, ...) doesn't work |
Дата | |
Msg-id | CA+M2pVU4GoHW2wwvE1jd32pYKYwXUpEuT=s1Ji7YAgnLFFARzA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: BackgroundWorkerInitializeConnection(NULL, ...)
doesn't work
Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work |
Список | pgsql-hackers |
The documentation for 9.4 says, in the "Background Worker Processes" section:
Once running, the process can connect to a database by calling BackgroundWorkerInitializeConnection(char *dbname, char *username). This allows the process to run transactions and queries using the SPI interface. If dbname is NULL, the session is not connected to any particular database, but shared catalogs can be accessed. If username is NULL, the process will run as the superuser created during initdb.
FATAL: database 0 does not exist
Based on my quick read through InitPostgres() and postinit.c, it's not even clear that there's a way to access the shared catalogs without connecting to a specific database. Certainly the rest of the code in InitPostgres expects MyDatabaseId to be set to something useful.
Regards,
Andrew Tipton
Andrew Tipton
В списке pgsql-hackers по дате отправления: