Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQ7Xa-001IrS-2C for pgsql-admin@arkaria.postgresql.org; Thu, 21 May 2026 17:50:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQ7XY-00Alc9-1l for pgsql-admin@arkaria.postgresql.org; Thu, 21 May 2026 17:50:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQ7XY-00Alc1-0X for pgsql-admin@lists.postgresql.org; Thu, 21 May 2026 17:50:37 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wQ7XX-00000000leW-0zIR for pgsql-admin@lists.postgresql.org; Thu, 21 May 2026 17:50:36 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-47c7b282d73so4209365b6e.3 for ; Thu, 21 May 2026 10:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779385833; cv=none; d=google.com; s=arc-20240605; b=TchuoNnDCOK7HSCA1QWcjPvTgWb7sx2bRoZ5sIaD59V6U9ZpfERvQXhJqy/3aw+Jg2 NJCg/mL3lG9tB01TNd3JjcT3GDU4KOceKIJ7NFydd+UsG1bsYjcR96xt1amA/jaBc4ul eLZq9m8INhPcSNbjALc7O5Wnx7J+ecTR7W77S/+WaCVgXLJ6NXHUbJJUX0TeKlheLXEn N2ydG/dM68Lr2DUJ4cgZTEbQA2UKZq/0UZl+Sc0tXXZaEHleIVFZNlL9fmaHH8V2hu5x dzzzzD02dj6xvlbSmRQHT6X/ifcbGxLjnOwACDglvAnK1hsvYBVMYAy6vdWlQ0FevQCC llnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=z3YYBHfsOPKU5QUxZDM4fu/d3JTevCy1sMAw68Lb/lI=; fh=druxZHa2fk4e6MLibibygn9AWWgeaAPo4m8Gpo2MBXU=; b=FgbMtUs16lT9GIgyhdXwY/1wBGNw1TbDKMf8+A2ZMqGwtfKUL026Y4bkM/LB4M9HWx XnHUMIrW9a11oBWGJKoPqdxfFReSEUPljYDK+NHY2MZZmj7R8s8S8Jb3J6BGX5cPQ8pM Z+hHlU1p0F5ArE0cG0hpc6MMolNHEb3TEySkFxTCZUgB7c0FOdPnvwobSnqB/C8T5je4 dnDt/BEsh/si317B60FKU+hWzTe6PbpjRY9yYZvkfOvrcCVjFQf3IE+9/pH93OA9tS8Z LfdObb2m/6IPIQ6B/4Rg7kPXXOnCWW9Qzf6xswLPrlaPI6uGUIK1WevD/auR+c+UDDTY 96PA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779385833; x=1779990633; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=z3YYBHfsOPKU5QUxZDM4fu/d3JTevCy1sMAw68Lb/lI=; b=c2kECmtmtjUm08zgSlxF5YK7jLotRlf11Cpn3qzvIQkEE+JdpiSNKzZIxwVJwmQcbk XhjXEQw2YsYw0NwhagiRJxF8sj4w1w4Ogik7X0fbGX2YfqUx6YQAKK+OR2F9Y6YqDwV1 SlERmrhJr0kY9M6XVIy7zRMDiw5jSwmffdBEXkGwDfEcYaMM5z5I+Zj07pxeHJ9VPGeS 7dGaohy80PpucbrHW3aNyBS2pgM1YMN2UJe3x4VeIWayJJ2rvLsmhc5DBwAhQvko4oRG bCXDfcEsTGvHtpiz6lpf8Pm53Q2EwNMjA+qDjY7JcaF2ZvwNCvNNPp1nG6CgQW00CfcO Fmuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779385833; x=1779990633; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z3YYBHfsOPKU5QUxZDM4fu/d3JTevCy1sMAw68Lb/lI=; b=c/qLHyycV2I874vePC0cNCsxzihrqMYWKoE+c7YHb2QS+NSoM1bpnliIe9gsLqLOA1 XW8wnuf9lC6uNnVxp3Q67bWZxi9+Ix15Q9NRkZ77Lyf6zc8GUak+Ik08nI0gZHa826N6 Hlf5A7ivzMNNZPfTD6bebbekLo8gBQlbMTaTKuoIC3tkQ8GSshpYYSixYpCMFei7dtFd a/36msc6UgGRZhMqJ9qZRa4jTVgLBaAKcpw8NHGd4FJUEeBkXPMIK+zZr8psTF/VlDR1 V4wJN1SYwTNvOmJhWlstZButotbgRp4xP07p1b9myXIXmo93tq604zgxchvRAe8zbhWd dJaA== X-Gm-Message-State: AOJu0YzD7vgZvZrE0D7m/UfphMBnAMoqEL4w+eR2/OrAjmSIuk7E5tb+ /xCJNxIYCiIR3jzDTT6PeeuKG3FlM59A+jtAEkS5wYdsI7Sb9oPrtsNjklHo/lrawPOqOXINi8b 41HHXmPfHK3q2m4jt7ntZu/lBNaOyuC3jCQ== X-Gm-Gg: Acq92OF/1Ahgrm81JIz/RIQfCipH4vzJfGYtJ4j7zTNQ1Dslum5kGKSdsDVBV5BLny8 Zui3UQSmpje0hgCgViNd/1MK2LHJTcOPT5wQtmd2ORbYndg3Dk9571vqf+CnRFolFWYUFjLMKVj qxA43BRnRqF9h8HgwKaZsVDTUWznQQwTM22+oPN7b0N8Fp2Nsj4VQGZBjOkWNBKXGGsQNPEp8zx Nl6FSWi8PDsGNqGs9EouCUgX4CpQaXs0anoZd4z81MxCtrBjVvE4fyxsR/CYDZJdzE2ErKKCwnq 3vEpj/Z5 X-Received: by 2002:a05:6809:f:20b0:485:3d17:df78 with SMTP id 5614622812f47-4853d17e90dmr976691b6e.41.1779385832958; Thu, 21 May 2026 10:50:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Thu, 21 May 2026 13:50:21 -0400 X-Gm-Features: AVHnY4LuPVBQdYXCJ9gi4_YfTxH3LF-F_kXrpiGG0RhQPWsMNoxptxfgW8DTfu0 Message-ID: Subject: Re: Partitioning table - Update on partitioning key To: Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000007def5b0652578c7a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007def5b0652578c7a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFPM Raj = wrote: > No, updating the partition key (say colum created_at)....when u update th= e > 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, 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 descripti= on >> 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 >> > --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000007def5b0652578c7a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
We'll need to see a "reproducer" (aka s= hort bit of code that reproduces your problem), with the output pasted here= .

On Thu, May 21, 2026 at 12:12=E2=80=AFPM Raj <rajeshkumar.dba09@gmail.com= > wrote:
No, updating the partition key (say colum created_at)....when= u update the date , say change march to April,=C2=A0 this record is in new= partition and we get this error

On Thu, 21 May 2026, 17:12 Laurenz Albe, &l= t;laurenz.alb= e@cybertec.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<= br> of the data it is operating on?

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

Yours,
Laurenz Albe


--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--0000000000007def5b0652578c7a--