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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Would a BGW need shmem_access or database_connection to enumerate databases?
Date: 2018-01-24 18:20:49
Message-ID: 20180124182049.GL17109@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 14, 2017 at 06:12:35PM -0500, Chapman Flack wrote:
> On 12/04/2017 09:13 AM, Craig Ringer wrote:
> > On 1 December 2017 at 23:04, 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?
> >>
> > Yes. BDR does it a lot.
>
> Would this doc patch be acceptable to clarify that, in case
> I'm not the last person who might wonder?

Thanks, patch applied to head.

---------------------------------------------------------------------------

> >From 3308ef5647e8ce4a84855b4d0cdddda09ba6aeb7 Mon Sep 17 00:00:00 2001
> From: Chapman Flack <chap(at)anastigmatix(dot)net>
> Date: Thu, 14 Dec 2017 18:09:14 -0500
> Subject: [PATCH] Clarify that a BGW can register a dynamic BGW.
>
> ---
> doc/src/sgml/bgworker.sgml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml
> index 4bc2b69..e490bb8 100644
> --- a/doc/src/sgml/bgworker.sgml
> +++ b/doc/src/sgml/bgworker.sgml
> @@ -41,7 +41,7 @@
> *worker, BackgroundWorkerHandle **handle</type>)</function>. Unlike
> <function>RegisterBackgroundWorker</function>, which can only be called from within
> the postmaster, <function>RegisterDynamicBackgroundWorker</function> must be
> - called from a regular backend.
> + called from a regular backend, possibly another background worker.
> </para>
>
> <para>
> --
> 1.8.3.1
>

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-01-24 18:22:14 Re: FOR EACH ROW triggers on partitioned tables
Previous Message Andres Freund 2018-01-24 18:20:18 Re: pgsql: Add parallel-aware hash joins.