summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2001-07-15 22:48:19 +0000
committerTom Lane2001-07-15 22:48:19 +0000
commitc8076f09d2eb82a28f27f97230be470fffe7a1e0 (patch)
tree1e357e7e28313386f9d2e789d3905b37ce2d58f6 /src/test
parent997439f59e1d487cb2bfa1384f6479fda0c4dd4c (diff)
Restructure index AM interface for index building and index tuple deletion,
per previous discussion on pghackers. Most of the duplicate code in different AMs' ambuild routines has been moved out to a common routine in index.c; this means that all index types now do the right things about inserting recently-dead tuples, etc. (I also removed support for EXTEND INDEX in the ambuild routines, since that's about to go away anyway, and it cluttered the code a lot.) The retail indextuple deletion routines have been replaced by a "bulk delete" routine in which the indexscan is inside the access method. I haven't pushed this change as far as it should go yet, but it should allow considerable simplification of the internal bookkeeping for deletions. Also, add flag columns to pg_am to eliminate various hardcoded tests on AM OIDs, and remove unused pg_am columns. Fix rtree and gist index types to not attempt to store NULLs; before this, gist usually crashed, while rtree managed not to crash but computed wacko bounding boxes for NULL entries (which might have had something to do with the performance problems we've heard about occasionally). Add AtEOXact routines to hash, rtree, and gist, all of which have static state that needs to be reset after an error. We discovered this need long ago for btree, but missed the other guys. Oh, one more thing: concurrent VACUUM is now the default.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/oidjoins.out16
-rw-r--r--src/test/regress/expected/opr_sanity.out4
-rw-r--r--src/test/regress/sql/oidjoins.sql8
3 files changed, 14 insertions, 14 deletions
diff --git a/src/test/regress/expected/oidjoins.out b/src/test/regress/expected/oidjoins.out
index 46bc60f6955..95c24879857 100644
--- a/src/test/regress/expected/oidjoins.out
+++ b/src/test/regress/expected/oidjoins.out
@@ -57,14 +57,6 @@ WHERE pg_am.aminsert != 0 AND
-----+----------
(0 rows)
-SELECT oid, pg_am.amdelete
-FROM pg_am
-WHERE pg_am.amdelete != 0 AND
- NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_am.amdelete);
- oid | amdelete
------+----------
-(0 rows)
-
SELECT oid, pg_am.ambeginscan
FROM pg_am
WHERE pg_am.ambeginscan != 0 AND
@@ -113,6 +105,14 @@ WHERE pg_am.ambuild != 0 AND
-----+---------
(0 rows)
+SELECT oid, pg_am.ambulkdelete
+FROM pg_am
+WHERE pg_am.ambulkdelete != 0 AND
+ NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_am.ambulkdelete);
+ oid | ambulkdelete
+-----+--------------
+(0 rows)
+
SELECT oid, pg_am.amcostestimate
FROM pg_am
WHERE pg_am.amcostestimate != 0 AND
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out
index 41328c53b1d..533655c52ea 100644
--- a/src/test/regress/expected/opr_sanity.out
+++ b/src/test/regress/expected/opr_sanity.out
@@ -480,8 +480,8 @@ WHERE p1.aggtransfn = p2.oid AND
(p2.pronargs = 1 AND p1.aggbasetype = 0)));
oid | aggname | oid | proname
-------+---------+-----+-------------
- 16963 | max | 768 | int4larger
- 16977 | min | 769 | int4smaller
+ 16959 | max | 768 | int4larger
+ 16973 | min | 769 | int4smaller
(2 rows)
-- Cross-check finalfn (if present) against its entry in pg_proc.
diff --git a/src/test/regress/sql/oidjoins.sql b/src/test/regress/sql/oidjoins.sql
index 88727a6c76e..34352128f44 100644
--- a/src/test/regress/sql/oidjoins.sql
+++ b/src/test/regress/sql/oidjoins.sql
@@ -29,10 +29,6 @@ SELECT oid, pg_am.aminsert
FROM pg_am
WHERE pg_am.aminsert != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_am.aminsert);
-SELECT oid, pg_am.amdelete
-FROM pg_am
-WHERE pg_am.amdelete != 0 AND
- NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_am.amdelete);
SELECT oid, pg_am.ambeginscan
FROM pg_am
WHERE pg_am.ambeginscan != 0 AND
@@ -57,6 +53,10 @@ SELECT oid, pg_am.ambuild
FROM pg_am
WHERE pg_am.ambuild != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_am.ambuild);
+SELECT oid, pg_am.ambulkdelete
+FROM pg_am
+WHERE pg_am.ambulkdelete != 0 AND
+ NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_am.ambulkdelete);
SELECT oid, pg_am.amcostestimate
FROM pg_am
WHERE pg_am.amcostestimate != 0 AND