Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
От | Bruce Momjian |
---|---|
Тема | Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE |
Дата | |
Msg-id | 20140417165253.GI7443@momjian.us обсуждение исходный текст |
Ответ на | Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE (Peter Geoghegan <pg@heroku.com>) |
Ответы |
Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
|
Список | pgsql-hackers |
On Mon, Feb 10, 2014 at 06:40:30PM +0000, Peter Geoghegan wrote: > On Sun, Jan 19, 2014 at 2:17 AM, Peter Geoghegan <pg@heroku.com> wrote: > > I'm just throwing an error when locking the tuple returns > > HeapTupleInvisible, and the xmin of the tuple is our xid. > > I would like some feedback on this point. We need to consider how > exactly to avoid updating the same tuple inserted by our command. > Updating a tuple we inserted cannot be allowed to happen, not least > because to do so causes livelock. > > A related consideration that I raised in mid to late January that > hasn't been commented on is avoiding updating the same tuple twice, > and where we come down on that with respect to where our > responsibility to the user starts and ends. For example, SQL MERGE > officially forbids this, but MySQL's INSERT...ON DUPLICATE KEY UPDATE > seems not to, probably due to implementation considerations. Where are we on this? -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-hackers по дате отправления: