Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fueXM-0001vN-7d for pgsql-admin@arkaria.postgresql.org; Tue, 28 Aug 2018 14:00:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fueXK-0007LL-Fi for pgsql-admin@arkaria.postgresql.org; Tue, 28 Aug 2018 14:00:02 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fueXK-0007L6-4o for pgsql-admin@lists.postgresql.org; Tue, 28 Aug 2018 14:00:02 +0000 Received: from mout02.posteo.de ([185.67.36.66]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fueXG-00077b-Tj for pgsql-admin@lists.postgresql.org; Tue, 28 Aug 2018 14:00:00 +0000 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id C914C21169 for ; Tue, 28 Aug 2018 15:59:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1535464796; bh=cweIhSn1fse3qjMklyvlV9YI7/sUdtmwh16mHCD1tFY=; h=Subject:To:From:Openpgp:Autocrypt:Date:From; b=VR4ThHmIJDOCDp7nZ3lHKso12B7Wmam8sUO7meT/i+d84gvIyKu1m4sjJ/oNeNYRc 5YcfpjoxMdkcOStiV0jblcHLobUZz+5+PGknXjnbaf7nEJyz4shlq+ZNAFQWjbx4bS iCCG60CtYl48M/eE/QauHczPfgDept+0d7GpFMU/vznQEzJ6uhF0sEQvSIdEA5TZ4j 80eg1JVIr8Ybh6RNLPTZbvKhBJqrToDPFTA3O9LpaSnA3qkokoF0pkUxHVdClz4db9 NCLimbHBBGoOaJjXLZevLxvdD9LuiQNOJ5MW7E4y6YfL8CcFblghhaSibdl758m6uI 1jwGhBjiu7y1A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4209P80gdvz9rxD for ; Tue, 28 Aug 2018 15:59:55 +0200 (CEST) Subject: Re: tuple concurrently updated To: pgsql-admin@lists.postgresql.org References: <986488f7-ff29-5dff-9425-5fcd6dcbb68a@posteo.de> <1378566276.366027624.1535454005687.JavaMail.root@zimbra82-e14.priv.proxad.net> <99342cd8-c2f6-31bd-f8e4-5c65658b1a2f@posteo.de> <1233975696.366149748.1535454938944.JavaMail.root@zimbra82-e14.priv.proxad.net> <114865725.367018989.1535461805284.JavaMail.root@zimbra82-e14.priv.proxad.net> <2be8ebca-fecc-51f4-39d7-9869941c679a@posteo.de> <1535463942466-0.post@n3.nabble.com> From: wambacher@posteo.de Openpgp: preference=signencrypt Autocrypt: addr=wambacher@posteo.de; keydata= xsFNBFsF9hIBEAC4W3M068RHHa+QJ3GjfG8n+sSUenUmRP0YCBL0X9FZfMRk328cXXs2qFP4 yqoegbbRmxC4jUHCrMaPdnRGugW8ZRnyoiKYZrmffx/SzB6kZzdS7RCIhYY3pHLUEd5TIFPG Z2Plr6s1TpwVZc4Gkk9Uj4vGcwzDlUB7feurBpMdKaOfYz53vNXnh0C/e/fg7jx8rw70zM7z UDKcttHshsUUscL4tnYqH4mt2svJ8jmCwpesehjxgywTjxF8vPqr3G2KQ8cW2HbISp1q8gZQ vbXycBZ8Ej5GKsKkYLUP4bN6wfPE1sWlmD3Y5xilYNsDJkREFTQOqpJCoeMROcLZSdpv058Y nKRVVPKaD969nRl8lnMgPEkDOSv5V+IhSebQEFX7vnSkZp/4kETy4NsAa89I6ATBt4H5McQL 3Py46INBbn7cH3k4Vljf8R1qvWYltM9aLZp3HbmKyRl0c5DSRSzKm7jCspmaYQ6pxZfLAx9M HRp2m3tIZPF+o8r8LukVS4Ji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XF4/3WH8rOtWZ2Gq75YdrMTJO3npJLoDhVCZZkxekcTIveQsv37b2nLZrvqrjWRl4 NAJD2K4kFICPEuErjLEsPIL4YBH2WNFlYpLgAjCBoShRV0IBd3dwF6BJnesR12Xh5H47qS9m +6h28JtTek9FvHCgmNiYcum8yBwBRwfSqLC4LJ9QU4JWb+rx6JLHkVu3sz274bv80B79gibD cjwz8joa6ISPfAaO2sJNhrKl23F8qor37FcXqauPnJwzS5cKNXcEpkBL9+OyPHBU0rMN4k+7 Xs1SWQ51ouO7nAA/IFGj Message-ID: Date: Tue, 28 Aug 2018 15:59:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1535463942466-0.post@n3.nabble.com> Content-Type: multipart/alternative; boundary="------------0C994DD9455F7B682A7EF21B" Content-Language: de-DE List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0C994DD9455F7B682A7EF21B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit updates are done using a program, that is without my control: osm2pgsql. this program does everthing which is necessary including locking. and it't running for years on many, many openstreetmap servers. because there was a crash before, it must be a data corruption problem, not programming error. regards walter Am 28.08.2018 um 15:45 schrieb pavan95: > 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 > -- My projects: Admin Boundaries of the World Missing Boundaries Emergency Map Postal Code Map (Germany only) Fools (QA for zipcodes in Germany) Postcode Boundaries of Germany --------------0C994DD9455F7B682A7EF21B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
updates are done using a program, that is without my control: osm2pgsql.

this program does everthing which is necessary including locking. and
it't running for years on many, many openstreetmap servers.

because there was a crash before, it must be a data corruption problem,
not programming error.

regards

walter
Am 28.08.2018 um 15:45 schrieb pavan95:
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


--------------0C994DD9455F7B682A7EF21B--