Re: UNIQUE INDEX unaware of transactions (a spin ofquestion)
От | Hannu Krosing |
---|---|
Тема | Re: UNIQUE INDEX unaware of transactions (a spin ofquestion) |
Дата | |
Msg-id | 3B2DD6D0.3D16636@tm.ee обсуждение исходный текст |
Ответ на | Re: UNIQUE INDEX unaware of transactions (a spin of question) (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: UNIQUE INDEX unaware of transactions (a spin ofquestion)
|
Список | pgsql-hackers |
Peter Eisentraut wrote: > > Jarmo Paavilainen writes: > > > *I think* this is correct behaviour, ie all that one transaction does should > > be visible to other transactions. > > Only in the "read uncommitted" transaction isolation level, which > PostgreSQL does not provide and isn't really that useful. > ... > > You can try yourself how PostgreSQL handles this, which is probably not > the right thing since unique contraints are not correctly transaction > aware. Is there any way to make unique indexes transaction-aware ? Are competeing updates on unique indexes transaction-aware ? I.e. can I be sure that if I do begin; if select where key=1 result exists then update where key=1 else insert(key,...)values(1,...) end; then this will have the expected behaviour in presence of multiple concurrent updaters? ------------------ Hannu
В списке pgsql-hackers по дате отправления: