Re: Would a BGW need shmem_access or database_connection to enumerate databases?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Would a BGW need shmem_access or database_connection to enumerate databases?
Date: 2017-12-04 06:33:35
Message-ID: CAA4eK1+eKXUjr4SrgT0tzFd=y3dF42b7Db=T3uKSuTHZ5ur9sA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 2, 2017 at 12:41 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Dec 1, 2017 at 10:04 AM, Chapman Flack <chap(at)anastigmatix(dot)net> wrote:
>> Can I call RegisterDynamicBackgroundWorker when not in the postmaster,
>> but also not in a "regular backend", but rather another BGW?
>
> I believe that doing it from another BGW works fine.
>

I think we are already doing it that way in autoprewarm
(src/contrib/pg_prewarm/autoprewarm.c).

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-12-04 07:13:41 Errands around AllocateDir()
Previous Message Andrey Borodin 2017-12-04 06:11:31 Re: Do we actually need an ItemId array on nbtree pages containing fixed-width tuples?