Re: Regarding Postgresql Transaction isolation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Regarding Postgresql Transaction isolation
Date
Msg-id 902902.1697060977@sss.pgh.pa.us
Whole thread Raw
In response to Regarding Postgresql Transaction isolation  (Ajay P S <ajayps547@gmail.com>)
List pgsql-hackers
Ajay P S <ajayps547@gmail.com> writes:
> However, I see that in the heap_update(heapam.c) function there is a
> brief interval(Lock and unlock the buffer) where a writer may block
> readers if the writer is updating the same row which readers are
> reading.
> Could anyone please help me with the below query?

> 1) Is my understanding correct? In so, Is it not against the
> statements "readers does not block writers and writers does not block
> readers"

You should probably read that as "there are no macroscopic block
conditions between readers and writers".  If you want to quibble
about whether a transient buffer lock violates the statement,
there are doubtless hundreds of other places where there's some
sort of short-term blockage.  A trivial example is that just
finding the buffer in the first place can be transiently blocked
by spinlock or LWLock exclusion on the buffer lookup data structures.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: New WAL record to detect the checkpoint redo location
Next
From: Thomas Munro
Date:
Subject: Re: The danger of deleting backup_label