Re: Partitioning table - Update on partitioning key

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Partitioning table - Update on partitioning key
Date: 2026-05-21 17:50:21
Message-ID: CANzqJaDCAodT3Fkm3BX=7=KHBxcLuFdKpJeRJpFz3RoKsD541w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

We'll need to see a "reproducer" (aka short bit of code that reproduces
your problem), with the output pasted here.

On Thu, May 21, 2026 at 12:12 PM Raj <rajeshkumar(dot)dba09(at)gmail(dot)com> wrote:

> No, updating the partition key (say colum created_at)....when u update the
> date , say change march to April, this record is in new partition and we
> get this error
>
> On Thu, 21 May 2026, 17:12 Laurenz Albe, <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
>> 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
>>
>

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2026-05-22 13:32:44 Request For Feature: pg_dump
Previous Message Raj 2026-05-21 16:11:55 Re: Partitioning table - Update on partitioning key