On Sun, Nov 1, 2015 at 1:11 AM, Amit Kapila <amit.kapil...@gmail.com> wrote:
> If we are going to add a new parameter to BackgroundWorker structure,
> then the same needs to be updated in docs  as well.
Right, good point.
> 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.
Client background worker modules need to be recompiled so that they
know about the new structure size, but they shouldn't need any code
> 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.
Well, I only need 4 bytes for this purpose, but I figured other users
of the background worker facility might like to have a little more. I
don't think 64 vs. 128 matters very much; I'm happy to hear other
opinions on this topic. What I think mostly matters is that we don't
make it so much that the overhead of copying it would add
substantially to background worker startup times. I assume that
either 64 or 128 is safe in that regard.
> /* Mutex protects remaining fields. */
> slock_t mutex;
> /* Maximum XactLastRecEnd of any worker. */
> XLogRecPtr last_xlog_end;
> } FixedParallelState;
> Now as above mutex will be used to just protect last_xlog_end, do you
> think it is better to modify the comment above mutex declaration?
The Enterprise PostgreSQL Company
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: