mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user