cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 622 forks source link

Move catalog initializations to Catalog bootstrap #1447

Open ksaito7 opened 6 years ago

ksaito7 commented 6 years ago

This PR makes all catalogs to be initialized in catalog bootstrap for checkpoints. This targets following two catalogs addressed in issue #1246.

ColumnStatsCatalog is initialized in bootstrap of SystemCatalogs. To do this, deleted database_oid column from pg_column_stats. In addition, modified a method AnalyzeStatsForAllTables() in stats_storage.h to collect stats for all tables in a database.

ZoneMapCatalog is initialized in bootstrap of Catalog. Since it seems that the latest Peloton doesn't use this catalog actually, added a boolean setting value to activate ZoneMapCatalog with false as default value.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.02%) to 76.489% when pulling 35e070c03bf37b631ff928f564e304e0ff6cb3ea on ksaito7:initialize_catalog into 3bc6d461dcd10e8f5b8dd6bdcdb0dbfe23d0256e on cmu-db:master.