pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: ROHIT SACHDEVA <sachdeva.rohit648@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: ERROR: could not serialize access due to concurrent update
Date: Tue, 16 May 2023 12:08:45 -0600
Message-ID: <474BDC88-BFEA-4D62-9D43-E0E7ABA1A13A@elevated-dev.com> (raw)
In-Reply-To: <CAKDb7aFLkz2btDpnkmefDBa-N=kUJ9HYhPmmD1o5+sLqYewY6A@mail.gmail.com>
References: <CAKDb7aFR1B7wvaLBxBDdark7jx=y31BY74WKdrPF1Zq5xwT+mA@mail.gmail.com>
	<CAKDb7aHL=NXzcFyL5oM3V6=D9P4VVdx_Gd=FskdbeqCotKFSSg@mail.gmail.com>
	<580a59b7e6ef605000c5dde862300e4290d9445a.camel@cybertec.at>
	<CAKDb7aGaZ94nxr1gSw2NfLu5arec9G+SOBDGRV7njxG_C5TZeg@mail.gmail.com>
	<6d2162718b0af8504c5f85013b78dc97a2046d59.camel@cybertec.at>
	<CAKDb7aFLkz2btDpnkmefDBa-N=kUJ9HYhPmmD1o5+sLqYewY6A@mail.gmail.com>

> On May 16, 2023, at 11:24 AM, ROHIT SACHDEVA <sachdeva.rohit648@gmail.com> wrote:
> 
> But due to this error our transaction is aborted and application team are getting these errors in their logs.
> 
> How can I figure this out? 
> Can there be work around for not getting this error.

As suggested previously, repeat the query.

It would be good, of course, to reduce the frequency of the errors by figuring out what is conflicting--are the queries generally taking too long compared to their frequency? But repeating a query when a lock conflict blocks it would still be the ultimate fallback, and is pretty standard practice.






view thread (9+ messages)  latest in thread

Message-ID: <474BDC88-BFEA-4D62-9D43-E0E7ABA1A13A@elevated-dev.com>
Permalink:  ../474BDC88-BFEA-4D62-9D43-E0E7ABA1A13A@elevated-dev.com/
Also on:    postgresql.org/message-id/474BDC88-BFEA-4D62-9D43-E0E7ABA1A13A@elevated-dev.com

 · 

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: scott_ribe@elevated-dev.com, sachdeva.rohit648@gmail.com, laurenz.albe@cybertec.at, pgsql-admin@lists.postgresql.org
  Subject: Re: ERROR: could not serialize access due to concurrent update
  In-Reply-To: <474BDC88-BFEA-4D62-9D43-E0E7ABA1A13A@elevated-dev.com>

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

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