Re: Question regarding how databases support atomicity

2024-05-07 Thread Adrian Klaver
On 5/7/24 9:48 AM, Siddharth Jain wrote: Thanks All for the kind responses. I understand how MVCC takes care of atomicity for updates to rows. I was developing a project where lets say data for each table is stored in its own folder together with metadata (we are not talking postgres now). S

Re: Question regarding how databases support atomicity

2024-05-07 Thread Tom Lane
Siddharth Jain writes: > Thanks All for the kind responses. I understand how MVCC takes care of > atomicity for updates to rows. I was developing a project where lets say > data for each table is stored in its own folder together with metadata (we > are not talking postgres now). So if I have two

Re: Question regarding how databases support atomicity

2024-05-07 Thread Siddharth Jain
Thanks All for the kind responses. I understand how MVCC takes care of atomicity for updates to rows. I was developing a project where lets say data for each table is stored in its own folder together with metadata (we are not talking postgres now). So if I have two tables A and B I have a folder s

Re: Question regarding how databases support atomicity

2024-05-03 Thread Tom Lane
"David G. Johnston" writes: > On Friday, May 3, 2024, Siddharth Jain wrote: >> 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. > Not in PostgreSQL. All work performed is considered provisional until a > c

Re: Question regarding how databases support atomicity

2024-05-03 Thread Christophe Pettus
> On May 3, 2024, at 20:02, Siddharth Jain wrote: > > > 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 > situat

Re: Question regarding how databases support atomicity

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, David G. Johnston wrote: > On Friday, May 3, 2024, Siddharth Jain wrote: > >> >> >> On Fri, May 3, 2024 at 8:00 PM Siddharth Jain wrote: >> >>> >>> >>> The way I understand this is that if there is a failure in-between, we >>> start undoing and reverting the previous ope

Re: Question regarding how databases support atomicity

2024-05-03 Thread David G. Johnston
On Friday, May 3, 2024, Siddharth Jain wrote: > > > On Fri, May 3, 2024 at 8:00 PM Siddharth Jain 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

Re: Question regarding how databases support atomicity

2024-05-03 Thread Siddharth Jain
On Fri, May 3, 2024 at 8:00 PM Siddharth Jain 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 w