Re: table lock and record lock

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: John Liu <johnl(at)synthesys(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: table lock and record lock
Date: 2002-10-01 21:24:07
Message-ID: Pine.LNX.4.33.0210011522300.347-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 1 Oct 2002, John Liu wrote:

> what's the default lock in pgsql?
>
> if I issued insert(copy)/or update processed
> on the same table but on different records
> the same time, how those processes will
> affect each other?

postgresql does not do "locking" in the sense of how most database do
locking. It uses a system called multi-version concurrency control that
prevents writers from blocking readers and vice versa. It has advantages
and disadvantages over the row locking methodology used by most other
databases, but you can read for yourself by looking in the docs at:

http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/mvcc.html

Good luck.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-10-01 21:24:50 Purpose of rscale/dscale in NUMERIC?
Previous Message Andrew Sullivan 2002-10-01 20:37:10 Re: table lock and record lock