Re: someone working to add merge?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: someone working to add merge?
Дата
Msg-id 20051115111435.GA25699@surnet.cl
обсуждение исходный текст
Ответ на Re: someone working to add merge?  (Csaba Nagy <nagy@ecircle-ag.com>)
Ответы Re: someone working to add merge?  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: someone working to add merge?  (Jaime Casanova <systemguards@gmail.com>)
Re: someone working to add merge?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Csaba Nagy wrote:

> session_1=> create table test (col smallint primary key);
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
> "test_pkey" for table "test"
> CREATE TABLE
> session_1=> begin;
> BEGIN
> cnagy=> insert into test values (1);
> INSERT 165068987 1
> 
> session_2=> begin;
> BEGIN
> session_2=> insert into test values (1);
> 
> [session_2 is now waiting]

This only happens because of the unique index.  There's no predicate
locking involved.  The btree code goes some lengths to make this work;
it would be probably simple to modify this to support MERGE or REPLACE
on the limited cases where there's a UNIQUE index.  Tom has already said
this twice (on this thread only; he has already said it before IIRC.)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: [ANNOUNCE] PostgreSQL Weekly News - November 13 2005
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Running PostGre on DVD