On Fri, Sep 16, 2016 at 3:53 PM, Julien Rouhaud <julien.rouh...@dalibo.com> wrote: > That's fine by me. Should this be done (if there's no objection) in the > same patch, or in another one?
I'd say "same patch". >> I'd suggest renaming the "parallel" flag to BackgroundWorkerSlot to >> "is_parallel_worker". Or, actually, what I think would be better is >> to give it a name like worker_class, and then we can have >> BGWORKER_CLASS_PARALLEL and perhaps eventually >> BGWORKER_CLASS_REPLICATION, etc. > > For now I just renamed "parallel" to "is_parallel_worker", since this is > straightforward. For a new "worker_class", I guess we'd need a new enum > stored in BackgroundWorker struct instead of the > BGWORKER_IS_PARALLEL_WORKER flag, and store it in the > BackgroundWorkerSlot. Should I do that instead? I suggest that we make it part of bgw_flags, but use a bitmask for it, like this: #define BGWORKER_CLASS_MASK 0x00f0 #define BGWORKER_CLASS_PARALLEL 0x0010 /* add additional bgworker classes here */ -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers