On Sat, Oct 31, 2015 at 11:35 AM, Robert Haas <robertmhaas@gmail.com> wrote: > > On Fri, Oct 30, 2015 at 11:24 AM, Robert Haas <robertmhaas@gmail.com> wrote: > > The other way to fix this is to pass down the index > > that the leader assigns to any given worker, and have the worker use > > that index instead of allocating its own separate index after > > connecting to the DSM segment. Unfortunately, there's not really a > > good way to pass that additional information down to the worker right > > now, but we could fix that pretty easily by adding an additional field > > to the BackgroundWorker structure, which the worker would then be able > > to access via MyBgworkerEntry. > > Here's a patch implementing that. >
If we are going to add a new parameter to BackgroundWorker structure,
then the same needs to be updated in docs [1] as well. I think adding
a new parameter to this structure might require some updations in
client applications. It seems worth to add a note for the same in commit
message, so that same could be reflected in Release Notes.
Also, I don't know why BGW_EXTRALEN needs to be 128 and not 64?
I guess you kept it so that in future if we need to pass more information,
then the same could be used which seems reasonable considering that
this is an exposed structure and we don't want to change it again.