Re: Do we force dependency?

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Do we force dependency?
Date: 2005-06-06 02:32:49
Message-ID: d80coa$1bjs$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-06 02:58:37 Re: Do we force dependency?
Previous Message Tom Lane 2005-06-06 02:32:17 Re: refactoring planner data structures