From: | Amit kapila <amit(dot)kapila(at)huawei(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Regarding BGworkers |
Date: | 2013-07-28 05:26:23 |
Message-ID: | 6C0B27F7206C9E4CA54AE035729E9C38421C6E45@szxeml558-mbs.china.huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
While going through below commit, few doubts/observations:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=7f7485a0cde92aa4ba235a1ffe4dda0ca0b6cc9a
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.
2. Shouldn't function
do_start_bgworker()/StartOneBackgroundWorker(void) be moved to bgworker.c
as similar functions AutoVacWorkerMain()/PgArchiverMain() are in their respective files.
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.
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit kapila | 2013-07-28 05:41:44 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
Previous Message | Marko Tiikkaja | 2013-07-28 00:23:47 | replication_reserved_connections |