Re: Too many serialization errors in production

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Too many serialization errors in production
Date: 2019-04-17 13:53:42
Message-ID: 28176.1555509222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

pavan95 <pavan(dot)postgresdba(at)gmail(dot)com> writes:
> We are facing the error "*could not serialize due to concurrent update*" too
> many times in our production server.

Why do you think there are too many? For an app that's depending on
isolation levels above Read Committed, that's an expected behavior.

> My concern here is if I change this isolation level to "Read Committed" will
> this suffice to stop this error occurrence?

You wouldn't see any more of those errors, but almost certainly you'd
have broken the application. Presumably, it's depending on retrying
serialization failures to ensure consistency across concurrent updates.
Without the retries, such cases would likely soon lead to inconsistent
data.

> Could you please suggest me how to stop any user from changing the
> default_transaction_isolation in PostgreSQL?

That's a spectacularly bad idea.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2019-04-17 14:02:10 Re: Performance killed with FDW when using CAST.
Previous Message Nsengiyumva Ramadhan 2019-04-17 13:49:29