public inbox for pgsql-admin@postgresql.org  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Raj <rajeshkumar.dba09@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Partitioning table - Update on partitioning key
Date: Thu, 21 May 2026 04:42:55 -0700
Message-ID: <dd7389df31fe3ac9c1eac94d5ddcb2d51f453f90.camel@cybertec.at> (raw)
In-Reply-To: <CAJk5AtZH+P1m39F4R2XLtzqgne7Za4qmMTgtBDbU8snXQBrZXQ@mail.gmail.com>
References: <CAJk5AtZH+P1m39F4R2XLtzqgne7Za4qmMTgtBDbU8snXQBrZXQ@mail.gmail.com>

On Thu, 2026-05-21 at 16:45 +0530, Raj wrote:
> Update happing on partition key.
> 
> And we get error 'Tuple to be locked was already moved to another partition due to concurrent update error..
> 
> What's the best solution to handle it?

Could you give us more context, like the exact statement and a description
of the data it is operating on?

If I had to guess, I would suspect that your UPDATE statement tries to modify
the same row more than once.

Yours,
Laurenz Albe






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Partitioning table - Update on partitioning key
  In-Reply-To: <dd7389df31fe3ac9c1eac94d5ddcb2d51f453f90.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox