Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/examples/puffs/pgfs remove FK references as it creates...



details:   https://anonhg.NetBSD.org/src/rev/bc7372fc2751
branches:  trunk
changeset: 778736:bc7372fc2751
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Apr 11 14:27:15 2012 +0000

description:
remove FK references as it creates more problems than it solves.
particularly, it involves shared lock on the referenced table
and causes frequent deadlock.

diffstat:

 share/examples/puffs/pgfs/newfs.sql |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 5661f516c72c -r bc7372fc2751 share/examples/puffs/pgfs/newfs.sql
--- a/share/examples/puffs/pgfs/newfs.sql       Wed Apr 11 14:26:44 2012 +0000
+++ b/share/examples/puffs/pgfs/newfs.sql       Wed Apr 11 14:27:15 2012 +0000
@@ -1,4 +1,4 @@
--- $NetBSD: newfs.sql,v 1.2 2012/04/11 14:26:19 yamt Exp $
+-- $NetBSD: newfs.sql,v 1.3 2012/04/11 14:27:15 yamt Exp $
 
 -- Copyright (c)2010,2011 YAMAMOTO Takashi,
 -- All rights reserved.
@@ -79,10 +79,10 @@
 -- a row in the dirent table describes a directory entry.
 -- the ".." and "." entries are handled differently and never appear here.
 CREATE TABLE dirent (
-       parent_fileid fileid NOT NULL REFERENCES file,
+       parent_fileid fileid NOT NULL, -- REFERENCES file,
        name text NOT NULL,
        cookie int8 NOT NULL UNIQUE DEFAULT nextval('dircookie_seq'),
-       child_fileid fileid NOT NULL REFERENCES file,
+       child_fileid fileid NOT NULL, -- REFERENCES file,
        CONSTRAINT dirent_pkey PRIMARY KEY(parent_fileid, name),
        CONSTRAINT dirent_notdot CHECK(name <> '.'),
        CONSTRAINT dirent_notdotdot CHECK(name <> '..'),



Home | Main Index | Thread Index | Old Index