From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ajay P S <ajayps547(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Regarding Postgresql Transaction isolation |
Date: | 2023-10-11 21:49:37 |
Message-ID: | 902902.1697060977@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Ajay P S <ajayps547(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2023-10-11 22:10:41 | Re: The danger of deleting backup_label |
Previous Message | Thomas Munro | 2023-10-11 21:42:39 | Re: New WAL record to detect the checkpoint redo location |