Re: Do we force dependency?

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: Do we force dependency?
Дата
Msg-id d80gjj$1td1$1@news.hub.org
обсуждение исходный текст
Ответ на Do we force dependency?  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes
>
> That should be impossible because drop/create take out locks at the
> table level.  Can you provide a reproducible test case?
>

To reproduce it:
Concurrently execute the following sql script serveral times:
("without oids","tablespace testsp" should be optional)

---

drop table T_ST;
drop table T_IT;
drop table T_DS;
drop table T_WR;

CREATE TABLE T_WR (
col1 int not NULL,
primary key(col1))
without oids tablespace testsp
;

CREATE TABLE T_DS (
col1 int not NULL,
col2 int not NULL,
primary key(col1, col2),
foreign key (col1) references T_WR(col1))
without oids tablespace testsp
;

CREATE TABLE T_IT (
col1 int not NULL,
primary key(col1))
without oids tablespace testsp
;

CREATE TABLE T_ST (
col1 int not null,
col2 int not null,
other_cols char (50) NULL ,
primary key(col1, col2),
foreign key(col1) references T_WR(col1),
foreign key(col2) references T_IT(col1))
without oids tablespace testsp
;

---

Actually I reproduced it at least 3 times on Pg8.0.1.

> If you can't make it happen easily by hand, one possible way to proceed
> is to run one or both sessions under gdb and set breakpoints at key
> places like recursiveDeletion().  If there is a timing issue it should
> be possible to expose it by delaying a process at the right places in
> this way.
>

Ok, I will do this and try to locate the exact place.

Regards,
Qingqing




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Do we force dependency?
Следующее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: unsafe use of hash_search(... HASH_ENTER ...)