From: | Siddharth Jain <siddhsql(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Question regarding how databases support atomicity |
Date: | 2024-05-04 03:02:49 |
Message-ID: | CAPqV3pQquw63Fv_fCJzAAnUWk86qHfg1cH=+mJ2N=4LGdDyrNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, May 3, 2024 at 8:00 PM Siddharth Jain <siddhsql(at)gmail(dot)com> wrote:
> I am trying to sharpen my understanding of databases. Let's say there is
> an operation foo as part of the public API that internally translates to
> more than 1 operation - I am sure there are examples like this in postgres.
> So to do foo we have to do following in order in all or none fashion:
>
> 1. Step 1
> 2. Step 2
> 3. Step 3
>
> The way I understand this is that if there is a failure in-between, we
> start undoing and reverting the previous operations one by one. But what if
> there is a failure and we are not able to revert an operation. How is that
> situation handled? e.g., something failed when we tried to do Step 3. now
> we revert Step 2 and succeed. but when we try to revert step 1 we fail.
> what happens now? To me, it seems its impossible to guarantee true
> atomicity in general.
>
> S.
>
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-05-04 03:10:31 | Re: Question regarding how databases support atomicity |
Previous Message | Tom Lane | 2024-05-04 02:44:23 | Re: How to Build Postgres in a Portable / Relocatable fashion? |