pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: ROHIT SACHDEVA <sachdeva.rohit648@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: ERROR: could not serialize access due to concurrent update
Date: Tue, 16 May 2023 18:35:00 +0200
Message-ID: <6d2162718b0af8504c5f85013b78dc97a2046d59.camel@cybertec.at> (raw)
In-Reply-To: <CAKDb7aGaZ94nxr1gSw2NfLu5arec9G+SOBDGRV7njxG_C5TZeg@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>

> 
On Tue, 2023-05-16 at 18:39 +0530, ROHIT SACHDEVA wrote:
> I am getting this error in the application logs, and this error is frequently coming.
> Could someone suggest what would be the best solution to overcome these types of errors.
> Isolation of the database is read committed. Should I change the isolation?
>
> Also foreign table scan is there on query.
>
> It's a postgres_fdw i am using.

That is normal if you modify any data via FDW, because one local query can result in several
foreign queries, which have to see the same snapshot of the data.

Repeat queries that fail that way, and keep your transactions as short as you can.

Yours,
Laurenz Albe





view thread (9+ messages)  latest in thread

Message-ID: <6d2162718b0af8504c5f85013b78dc97a2046d59.camel@cybertec.at>
Permalink:  ../6d2162718b0af8504c5f85013b78dc97a2046d59.camel@cybertec.at/
Also on:    postgresql.org/message-id/6d2162718b0af8504c5f85013b78dc97a2046d59.camel@cybertec.at

 · 

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, sachdeva.rohit648@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: ERROR: could not serialize access due to concurrent update
  In-Reply-To: <6d2162718b0af8504c5f85013b78dc97a2046d59.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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox