Re: Regarding BGworkers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regarding BGworkers
Date: 2013-08-01 16:22:05
Message-ID: CA+TgmoaGgYGm=VepraJD5MmSEuaO=dYp=HWVhhqChMvX5_N9zQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 28, 2013 at 1:26 AM, Amit kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> 1. Bgworker.c -
> FindRegisteredWorkerBySlotNumber()
> {
> ..
> /*
> * Copy contents of worker list into shared memory. Record the
> * shared memory slot assigned to each worker. This ensures
> * a 1-to-1 correspondence betwen the postmaster's private list and
> * the array in shared memory.
> */
> ..
> }
> a. Comment in function doesn't seem to be appropriate. It seems copy-pasted from function
> BackgroundWorkerShmemInit
> b. all function's except this have function header to explain a bit about function, though
> it might not be required here, but not sure so pointed.

Fixed.

> 2. Shouldn't function
> do_start_bgworker()/StartOneBackgroundWorker(void) be moved to bgworker.c
> as similar functions AutoVacWorkerMain()/PgArchiverMain() are in their respective files.

Yes, perhaps so. Other votes?

> 3. bgworker.h - file header still contains explanation only as per old functionality.
> Not sure, if it needs to be updated for new functionality of dynamic workers.

Fixed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-08-01 16:37:14 Re: replication_reserved_connections
Previous Message Noah Misch 2013-08-01 16:15:19 pg_basebackup vs. Windows and tablespaces