Re: FOR KEY LOCK foreign keys

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: FOR KEY LOCK foreign keys
Дата
Msg-id AANLkTimgf2OPZ8-25Q3_v+avF2fjcxVpyejSjm3_yuxr@mail.gmail.com
обсуждение исходный текст
Ответ на Re: FOR KEY LOCK foreign keys  (Noah Misch <noah@leadboat.com>)
Ответы Re: FOR KEY LOCK foreign keys  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Fri, Feb 11, 2011 at 09:13, Noah Misch <noah@leadboat.com> wrote:
> The patch had a trivial conflict in planner.c, plus plenty of offsets.  I've
> attached the rebased patch that I used for review.  For anyone following along,
> all the interesting hunks touch heapam.c; the rest is largely mechanical.  A
> "diff -w" patch is also considerably easier to follow.

Here's a simple patch for the RelationGetIndexAttrBitmap() function,
as explained in my last post. I don't know if it's any help to you,
but since I wrote it I might as well send it up. This applies on top
of Noah's rebased patch.

I did some tests and it seems to work, although I also hit the same
visibility bug as Noah.

Test case I used:

THREAD A:
create table foo (pk int primary key, ak int);
create unique index on foo (ak) where ak != 0;
create unique index on foo ((-ak));

create table bar (foo_pk int references foo (pk));
insert into foo values(1,1);
begin; insert into bar values(1);

THREAD B:
begin; update foo set ak=2 where ak=1;


Regards,
Marti

Вложения

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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: tsearch Parser Hacking
Следующее
От: Robert Haas
Дата:
Сообщение: Re: CommitFest 2011-01 as of 2011-02-04