Re: tuple concurrently updated

From: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: tuple concurrently updated
Date: 2018-08-28 13:45:42
Message-ID: 1535463942466-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Walter,

Why can't you go with a postgres service restart in order to get rid of this
error?

>DELETE FROM planet_osm_line WHERE osm_id = -166570;
>FEHLER: tuple concurrently updated

Concurrent transactions can update or delete one or more of those rows
before DELETE can lock the rows (at least with the default isolation level
READ COMMITTED). This would result in your error message.

To defend against this race condition, lock the rows in the SELECT with FOR
UPDATE (or other options)

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message 066ce286 2018-08-28 13:46:02 Re: tuple concurrently updated
Previous Message wambacher 2018-08-28 13:38:37 Re: tuple concurrently updated