Re: WIP: generalized index constraints
От | Jeff Davis |
---|---|
Тема | Re: WIP: generalized index constraints |
Дата | |
Msg-id | 1253395251.23353.203.camel@jdavis обсуждение исходный текст |
Ответ на | Re: WIP: generalized index constraints (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: WIP: generalized index constraints
|
Список | pgsql-hackers |
On Sat, 2009-09-19 at 16:43 -0400, Tom Lane wrote: > I don't understand why this isn't handled exactly the way unique > constraints are done now. Frankly, the amount of added complexity you > propose below is enough to make me want to reject the patch forthwith; > given that it's going to be a relatively little-used feature, the bugs > are never going to be out of it completely if we do it like this. Unique constraints lock the index page while the insert is happening. How am I supposed to do that, when the conflicting values might be anywhere in the index (circles have no total order)? It may sound complex, but it basically boils down to a two stage process:1. test for conflicts with concurrently-inserting backends2. test for conflicts that already exist in the index (dirtyor not) I don't think that it's ridiculously complex. In fact, I think there are relatively few scenarios that will make any real difference, and those scenarios can be tested with gdb pretty thoroughly. Regards,Jeff Davis
В списке pgsql-hackers по дате отправления: