Re: Do we force dependency?
От | Qingqing Zhou |
---|---|
Тема | Re: Do we force dependency? |
Дата | |
Msg-id | d80coa$1bjs$1@news.hub.org обсуждение исходный текст |
Ответ на | Do we force dependency? (Qingqing Zhou <zhouqq@cs.toronto.edu>) |
Ответы |
Re: Do we force dependency?
|
Список | pgsql-hackers |
"Tom Lane" <tgl@sss.pgh.pa.us> writes > > Deletion scans the entries and either deletes the dependent objects or > raises error. It's not "by hand" particularly, at least not for > anything outside dependency.c. If you were to write code that deleted > objects directly without going through the dependency mechanism, it > wouldn't get accepted ;-) > The reason I raise this question is because I corrupted pg_trigger by concurrently perform drop/create table (with foreign keys). This was posted in pgbugs, but it is weird that I can't find out the original post. I suspect there are some race conditions in object deletion but not sure where: test=# select * from pg_trigger where tgconstrrelid not in (select oid from pg_class);tgrelid | tgname | tgfoid | tgtype | tgenabled | tgisconstraint | tgconstrname | tgconstrrelid | tgdeferrable | tginitdeferred | tgnargs| tgattr | tgargs ---------+----------------------------+--------+--------+-----------+------- ---- -----+----------------+---------------+--------------+----------------+----- ---- +--------+------------------------------------------------------------------ - 1260 | pg_sync_pg_pwd | 1689 | 29 | t | f | | 0 | f | f | 0 | | 1261 | pg_sync_pg_group | 1689 | 29 | t | f | | 0 | f | f | 0 | | 21598 | RI_ConstraintTrigger_21603 | 1644 | 21 | t | t | t_ds_col1_fkey | 21594 | f | f | 6 | | t_ds_col1_fkey\000t_ds\000t_wr\000UNSPECIFIED\000col1\000col1\000 (3 rows) Regards, Qingqing
В списке pgsql-hackers по дате отправления: