Skip site navigation (1) Skip section navigation (2)

pgsql: Rewrite DROP's dependency traversal algorithm into an honest

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rewrite DROP's dependency traversal algorithm into an honest
Date: 2008-06-08 22:41:04
Message-ID: 20080608224104.F3E9475602C@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Rewrite DROP's dependency traversal algorithm into an honest two-pass
algorithm, replacing the original intention of a one-pass search, which
had been hacked up over time to be partially two-pass in hopes of handling
various corner cases better.  It still wasn't quite there, especially as
regards emitting unwanted NOTICE messages.  More importantly, this approach
lets us fix a number of open bugs concerning concurrent DROP scenarios,
because we can take locks during the first pass and avoid traversing to
dependent objects that were just deleted by someone else.

There is more that can be done here, but I'll go ahead and commit the
base patch before working on the options.

Modified Files:
--------------
    pgsql/src/backend/access/index:
        genam.c (r1.68 -> r1.69)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/index/genam.c?r1=1.68&r2=1.69)
    pgsql/src/backend/catalog:
        dependency.c (r1.73 -> r1.74)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/dependency.c?r1=1.73&r2=1.74)
    pgsql/src/include/access:
        genam.h (r1.72 -> r1.73)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/genam.h?r1=1.72&r2=1.73)
    pgsql/src/include/catalog:
        dependency.h (r1.35 -> r1.36)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/dependency.h?r1=1.35&r2=1.36)
    pgsql/src/test/regress/expected:
        alter_table.out (r1.106 -> r1.107)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/alter_table.out?r1=1.106&r2=1.107)
        create_view.out (r1.11 -> r1.12)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/create_view.out?r1=1.11&r2=1.12)
        domain.out (r1.43 -> r1.44)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/domain.out?r1=1.43&r2=1.44)
        foreign_key.out (r1.45 -> r1.46)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/foreign_key.out?r1=1.45&r2=1.46)
        inherit.out (r1.24 -> r1.25)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/inherit.out?r1=1.24&r2=1.25)
        namespace.out (r1.3 -> r1.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/namespace.out?r1=1.3&r2=1.4)
        plancache.out (r1.6 -> r1.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/plancache.out?r1=1.6&r2=1.7)
        privileges.out (r1.36 -> r1.37)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/privileges.out?r1=1.36&r2=1.37)
        subselect.out (r1.17 -> r1.18)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/subselect.out?r1=1.17&r2=1.18)
        truncate.out (r1.14 -> r1.15)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/truncate.out?r1=1.14&r2=1.15)
    pgsql/src/test/regress/output:
        tablespace.source (r1.5 -> r1.6)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/output/tablespace.source?r1=1.5&r2=1.6)

pgsql-committers by date

Next:From: User GleuDate: 2008-06-08 22:44:15
Subject: pgsnap - pgsnap: TODO review + Demo of the next release.
Previous:From: Tom LaneDate: 2008-06-08 22:15:45
Subject: pgsql: Stamp 7.4.21 (except for configure.in/configure)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group