I have a postgres database that uses sequences extensively to generate primary keys of tables. After a lot of usage of this database i.e. Adding/Update/Delete operation the columns that uses sequences for primary keys now have a lot holes/gaps in them and the sequence value itself is very high.
我的问题是:有什么方法可以弥补主键中的这些空白吗?哪一个应该降低该列中数字的最大值,然后重置序列?
注意:这些列中的许多列也被其他列引用为ForeignKeys。