Re: 'tuple concurrently updated' error w/o visible catalog updates

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alex Kliukin <alexk(at)hintbits(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 'tuple concurrently updated' error w/o visible catalog updates
Date: 2018-05-18 19:54:39
Message-ID: CA+Tgmobpj_w++r9TY2hEVSrqtUnFVFa6XqFUf4m3utQ=abLQjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 17, 2018 at 9:49 AM, Alex Kliukin <alexk(at)hintbits(dot)com> wrote:
> Earlier this week we have split our Postgres 9.6.8 shards, each having two
> databases, into one database per shard setup. This was done by promoting
> replicas and subsequently removing unused databases.
>
> Immediately afterwards we have discovered repeated 'tuple concurrently updated'
> errors on most of those new shards.

Maybe you did the promotion incorrectly and ended up with a corrupted database?

If you can reproduce the problem, I'd try attaching a debugger to the
backend and getting a stack trace from the point of the error. The
only instances of that error in the whole source base (or at least in
the version I'm looking at) are in simple_heap_update() and
simple_heap_delete(), so you could set breakpoints on the elog() lines
in those functions.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-05-18 20:02:18 Re: Should we add GUCs to allow partition pruning to be disabled?
Previous Message Robert Haas 2018-05-18 19:50:02 Re: Question about xmloption and pg_restore