"Tom Lane" <[EMAIL PROTECTED]> 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
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])