Re: DELETE ERROR: tuple concurrently updated

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Михаил Кечинов <kechinoff(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DELETE ERROR: tuple concurrently updated
Date: 2009-12-29 11:38:26
Message-ID: 407d949e0912290338j2dffc36bvad2adb7cb9f6619c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 29, 2009 at 9:41 AM, Михаил Кечинов <kechinoff(at)gmail(dot)com> wrote:
> When I try to delete one row from database (for example):
> delete from document where numdoc = 901721617
> I have this error:
> ERROR: tuple concurrently updated
> SQL state: XX000
> I know, that no one deleting this row at same time.
> What's mean this error?

So this error can only come from a normal SQL-level delete if there is
associated TOAST data which is being deleted as well. In which case
that TOAST data must be already marked deleted -- which shouldn't be
possible.

It sounds like you have a database where some writes from earlier
transactions reached the database and others didn't. That can happen
if you take an inconsistent backup (without using pg_start_backup())
or if the drive you're using confirmed writes before crashing but
didn't actually write them.

You might be able to get somewhat further by reindexing the TOAST
table for this table. To do so do "REINDEX TABLE document". But note
that you could run into further errors from the missing toast data.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Михаил Кечинов 2009-12-29 12:24:12 Re: DELETE ERROR: tuple concurrently updated
Previous Message John R Pierce 2009-12-29 11:13:34 Re: DELETE ERROR: tuple concurrently updated