Re: Causes an insert into a table with a unique column

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: u15074 <u15074(at)hs-harz(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Causes an insert into a table with a unique column
Date: 2003-03-18 16:15:43
Message-ID: 3E77462F.8000206@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your new version will coexist with the old version till the point of
committing the transacton ( usually auto happens ). Then some sort of
flag is changed that says the new record is current and the old values
get flagged as not durrent, to be 'vacuumed' at some point.

u15074 wrote:
> I have a table containing a unique (primary key) column.
> When I start a transaction and insert a row into the table, that doesn't
> violate the unique constraint, will the whole table be locked or will there be
> a rowlock?
> What happens if I have a parallel transaction running, that inserts the same
> row like the other transaction? Will I get an error or will I be able to
> continue the transaction, but get an error when trying to commit?
>
> Thanks.
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-03-18 16:19:47 Re: Red Hat snubbed by Oracle
Previous Message Dennis Gearon 2003-03-18 16:10:20 Re: MS SQL 2K replication/backup