diff options
Diffstat (limited to 'src/backend/commands/vacuum.c')
-rw-r--r-- | src/backend/commands/vacuum.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index eeee7654e0e..83b8c18e8eb 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.396 2009/11/16 21:32:06 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.397 2009/12/07 05:22:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -763,7 +763,8 @@ vac_update_relstats(Relation relation, /* * If we have discovered that there are no indexes, then there's no - * primary key either. This could be done more thoroughly... + * primary key either, nor any exclusion constraints. This could be done + * more thoroughly... */ if (!hasindex) { @@ -772,6 +773,11 @@ vac_update_relstats(Relation relation, pgcform->relhaspkey = false; dirty = true; } + if (pgcform->relhasexclusion && pgcform->relkind != RELKIND_INDEX) + { + pgcform->relhasexclusion = false; + dirty = true; + } } /* We also clear relhasrules and relhastriggers if needed */ |