Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6651741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:02:50+00:00 2026-05-26T01:02:50+00:00

The PostgreSQL manual page on the Serializable Isolation Level states: [Like] the Repeatable Read

  • 0

The PostgreSQL manual page on the Serializable Isolation Level states:

[Like] the Repeatable Read level, applications using this level must be prepared to retry transactions due to serialization failures.

What are the conditions for encountering a serialization failure at the Repeatable Read or Serializable levels?

I tried to induce a serialization failure with two instances of psql running, but even though a transaction was committed by one instance, the other instance, inside a serializable-level transaction while the other committed, was successful in committing its changes. Both simply inserted records into a table, so perhaps I need to try something more complex.

Basically I am trying to understand what happens in the event of a serialization failure and how serialization failures arise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:02:50+00:00Added an answer on May 26, 2026 at 1:02 am

    For REPEATABLE READ this example will do:

    Prepare stage:

    psql-0> CREATE TABLE foo(key int primary key, val int);
    CREATE TABLE
    psql-0> INSERT INTO foo VALUES(1, 42);
    

    Now keep an eye on the psql-X part indicating the interleaving of actions:

    psql-1> BEGIN ISOLATION LEVEL REPEATABLE READ;
    psql-1> UPDATE foo SET val=val+1;
    UPDATE 1
    psql-2> BEGIN ISOLATION LEVEL REPEATABLE READ;
    psql-2> UPDATE foo SET val=val+1;
    *** no output, transaction blocked ***
    
    psql-1> COMMIT;
    
    psql-2> *** unblocks ***
    ERROR:  could not serialize access due to concurrent update
    

    An example for SERIALIZABLE is in the documentation for PostgreSQL 9.1 and should be no problem from here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In postgresql a query in the querylog gets something like this: 2009-02-05 00:12:27 CET
This question may look like a duplicate of: How to uninstall postgresql on my
In Postgresql 8 why this is ok select * from prod where code like
In Postgresql you can create additional Aggregate Functions with CREATE AGGREGATE name(...); But this
Using PostgreSQL triggers, is it possible to record the changes that have happened to
I've been using PostgreSQL a little bit lately, and one of the things that
I am using character varying data type in PostgreSQL. I was not able to
Where can I find a detailed manual about PostgreSQL naming conventions? (table names vs.
PostgreSQL has allowed me to name a column campaign_$. I like the name because
I need a way to insert images into a PostgreSQL database without using forms.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.