| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: broken documentation: BackgroundWorkerInitializeConnection(NULL, NULL); |
| Date: | 2015-05-15 19:54:32 |
| Message-ID: | CA+TgmoZ1ngjs7j_5kg+bxVaJx1MRmCpF5EUqijUoWsFdFzhT3A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, May 15, 2015 at 3:53 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, May 14, 2015 at 8:25 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> The documentation (or this feature) is broken still
>>
>> If dbname is NULL or dboid is InvalidOid, the session is not connected to
>> any particular database, but shared catalogs can be accessed. If username is
>> NULL or useroid is InvalidOid, the process will run as the superuser created
>> during initdb. A background worker can only call one of these two functions,
>> and only once. It is not possible to switch databases.
>>
>> But it fails with error:
>>
>> FATAL: database 0 does not exist
>
> Ugh. I think that's a bug.
>
> Patch attached.
>
> The test code I used to verify that this works is also attached.
>
> If there are no objections, I will commit and back-patch.
Oops. Really attached this time.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| Attachment | Content-Type | Size |
|---|---|---|
| no-db-worker.patch | application/x-patch | 1.1 KB |
| contrib-no-db-worker.patch | application/x-patch | 4.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2015-05-15 19:56:47 | Re: Patch for bug #12845 (GB18030 encoding) |
| Previous Message | Robert Haas | 2015-05-15 19:53:50 | Re: broken documentation: BackgroundWorkerInitializeConnection(NULL, NULL); |