Re: Transaction and table partitioning

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "Dragan Zubac" <zubacdragan(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction and table partitioning
Date: 2006-07-04 01:22:52
Message-ID: 87y7vaqi37.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Dragan Zubac" <zubacdragan(at)gmail(dot)com> writes:

> Hello
>
> Is it possible to use transactions with 'per sub table' locks? What I
> mean,if I partition a table and use transaction on that table with
> constraint,will the database lock the master table (and all subtables),or
> only sub table where the data is ?

Unless you're doing ALTER TABLE or something like that Postgres never locks
tables. Two backends can insert into the same table at the same time and
neither has to wait until the other is done.

If you are updating the same record then of course one has to wait but then
partitioning isn't going to help in that case.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Agent M 2006-07-04 03:28:36 binds only for s,u,i,d?
Previous Message Tom Lane 2006-07-03 22:59:06 Re: mysterious nbtree.c comment