Re: Causes an insert into a table with a unique column - Mailing list pgsql-general

From Dennis Gearon
Subject Re: Causes an insert into a table with a unique column
Date
Msg-id 3E77462F.8000206@cvc.net
Whole thread Raw
In response to Causes an insert into a table with a unique column a tablelock or a rowlock?  (u15074 <u15074@hs-harz.de>)
List 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
>


pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: MS SQL 2K replication/backup
Next
From: Bruce Momjian
Date:
Subject: Re: Red Hat snubbed by Oracle