aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/lsyscache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/cache/lsyscache.c')
-rw-r--r--src/backend/utils/cache/lsyscache.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 4f9cd3fefa7..75994a31f27 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.33 1999/08/16 02:06:25 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.34 1999/09/09 02:36:04 tgl Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -224,6 +224,14 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
return 1.0 / (double) ntuples;
/*
+ * VACUUM ANALYZE does not compute disbursion for system attributes,
+ * but some of them can reasonably be assumed unique anyway.
+ */
+ if (attnum == ObjectIdAttributeNumber ||
+ attnum == SelfItemPointerAttributeNumber)
+ return 1.0 / (double) ntuples;
+
+ /*
* VACUUM ANALYZE has not been run for this table.
* Produce an estimate = 1/numtuples. This may produce
* unreasonably small estimates for large tables, so limit