From: Artur Pietruk <arturp@plukwa.net>
To: pgsql-admin@postgresql.org
Subject: PostgreSQL internals and implementation of transactions
Date: Fri, 17 Dec 2004 23:07:42 +0100
Message-ID: <20041217220742.GI2149@plukwa.net> (raw)
Hi,
I'm happy user of PostgreSQL for some years. I'm intrested to
confirm how exactly transaction engine is implemented in current
PostgreSQL version. I made my own findnings, based on my personal
experiences through years of using PGSQL, and by reading some pgsql docs
and presentations made by developers that I've found on web (going
back as far as to some old writings about postgres on Berkeley Uniwersity).
Here is how I understand it works in general (please note that
english is not my native language, and in some cases I might not know
correct english terms to use):
- Transaction isolation is done in smart way via some kind of
"scratch"/"temporary" buffers, here implemented as tuples with
versioning - where the valid tuple is the last commited, or
last written under the current transaction
- Transaction multiprocessing flow consistency is implemented
via two phased locking, with locks for read and write, where
multiple reads of tuple by different transactions are allowed
as long as no single transaction has written; and if different
transaction try to combine read/write and write on the same
tuple, then the one who tries to acquire lock later, is
waiting until lock is released.
And my question is: are the above assumptions on inner workings
valid for current PGSQL version? Is there anything important about state
of things, that I'm missing? Are there any good pointers to docs where I
could read about pgsql internals in regards to transactioning?
Thanks in advance for answer!
PS. And as a long time pgsql user, I need to say big thanks for
develpers and supporters of postgres! I like and admire the PostgreSQL's
way of doing things in a clean "the right" way, according to standards,
keeping in mind future expand of PGSQL features and so on.
Best regards,
--
--- Artur Pietruk, arturp@plukwa.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: arturp@plukwa.net
Subject: Re: PostgreSQL internals and implementation of transactions
In-Reply-To: <20041217220742.GI2149@plukwa.net>
References: <20041217220742.GI2149@plukwa.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox