diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-01-25 17:51:59 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-01-25 17:51:59 -0500 |
commit | bd1ad1b019cda851a3e925133c056930368e6424 (patch) | |
tree | 7a0457da38302b33a9ffb79f2904174b22b1805c /src/backend/commands/vacuum.c | |
parent | 88452d5ba6b3e8ad49133ac1a660ce0725710f8c (diff) |
Replace pg_class.relhasexclusion with pg_index.indisexclusion.
There isn't any need to track this state on a table-wide basis, and trying
to do so introduces undesirable semantic fuzziness. Move the flag to
pg_index, where it clearly describes just a single index and can be
immutable after index creation.
Diffstat (limited to 'src/backend/commands/vacuum.c')
-rw-r--r-- | src/backend/commands/vacuum.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 9098c5d5c6f..56637116745 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -524,21 +524,12 @@ vac_update_relstats(Relation relation, /* * If we have discovered that there are no indexes, then there's no - * primary key either, nor any exclusion constraints. This could be done - * more thoroughly... + * primary key either. This could be done more thoroughly... */ - if (!hasindex) + if (pgcform->relhaspkey && !hasindex) { - if (pgcform->relhaspkey) - { - pgcform->relhaspkey = false; - dirty = true; - } - if (pgcform->relhasexclusion && pgcform->relkind != RELKIND_INDEX) - { - pgcform->relhasexclusion = false; - dirty = true; - } + pgcform->relhaspkey = false; + dirty = true; } /* We also clear relhasrules and relhastriggers if needed */ |