Re: tablecmds.c and lock hierarchy
От | Alvaro Herrera |
---|---|
Тема | Re: tablecmds.c and lock hierarchy |
Дата | |
Msg-id | 20150804172320.GS2441@postgresql.org обсуждение исходный текст |
Ответ на | Re: tablecmds.c and lock hierarchy (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: tablecmds.c and lock hierarchy
|
Список | pgsql-hackers |
Michael Paquier wrote: > On Tue, Aug 4, 2015 at 2:43 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > > Maybe the solution to this is to add the concept of "addition" of two > > lock modes, where the result is another lock mode that conflicts with > > any lock that would conflict with either of the two operand lock modes. > That's commutative, as this is basically looking at the conflict table > to get the union of the bits to indicate what are all the locks > conflicting with lock A and lock B, and then we select the lock on the > table that includes the whole union, with a minimum number of them. Yes. > Now, let's take for example this case with locks A, B, C, D: > - Lock A conflicts with ACD > - B with BCD > - C with itself > - D with itself > What would you choose as a result of add(C,D)? A or B? Or the super > lock conflicting with all of them? This appears to me an hypothetical case that I don't think occurs in our conflicts table, so I wouldn't worry about it. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: