mvcc and lock

From: postgresql <postgresql(at)db(dot)pku(dot)edu(dot)cn>
To: pgsql-hackers(at)postgresql(dot)org <pgsql-hackers(at)postgresql(dot)org>
Subject: mvcc and lock
Date: 2003-03-19 00:20:23
Message-ID: 200303190811734.SM01104@gaojun
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all
I have read some code on transaction part.
When the new transaction starts, it record the snapshot of database containing the current transaction id,etc. So depending on the snapshot
, the transaction decide which tuple is visible.
But transaction could also be implemented by lock. so I am not sure how
the transaction is implemented, by MVCC or Lock, or by both?
In my option, when tuple is processed in readonly mode(select), MVCC is enough. but when tuple is changed, lock is used. I am not sure whether the explanation is correct.
Thanks for any comments.
Best regards.
josh

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-19 00:54:41 Re: [INTERFACES] Roadmap for FE/BE protocol redesign
Previous Message postgresql 2003-03-19 00:07:30 mvcc and lock