cmu-db / peloton

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

Can't recover tile group from LayoutCatalog in checkpoint recovery #1374

Closed ksaito7 closed 6 years ago

ksaito7 commented 6 years ago

Current LayoutCatalog table, pg_layout, doesn't have about ROW or COLUMN layout. So checkpoint recovery can't decide which layout was used in the recovered tile group from LayoutCatalog. To recover it from LayoutCatalog, all layout info has to insert into pg_layout.

Additionally, layout oid in case of ROW or COLUMN is not initialized when constructed by Layout(const oid_t num_columns, LayoutType layout_type). Actually, a layout oid of default layout in DataTable is not set 0 or 1. It has to initialize according to layout type to insert it into pg_layout.

ksaito7 commented 6 years ago

To recover DataTable, its catalog, pg_table, doesn't have default layout information. We also need layout_oid for default layout in pg_table.