Re: ParallelContexts can get confused about which worker is which
От | Robert Haas |
---|---|
Тема | Re: ParallelContexts can get confused about which worker is which |
Дата | |
Msg-id | CA+Tgmobun2LKHQWxOC-F3BETUsr3SoxTW-fUEihv7tc6gU2MYA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ParallelContexts can get confused about which worker is which (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: ParallelContexts can get confused about which worker is which
|
Список | pgsql-hackers |
On Sun, Nov 1, 2015 at 1:11 AM, Amit Kapila <amit.kapila16@gmail.com> wrote: > If we are going to add a new parameter to BackgroundWorker structure, > then the same needs to be updated in docs [1] 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 changes. > 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? Meh. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: