[Phase 1][colocation] Set colocation_id consistently in schemas #5017
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
Jira Link: [DB-376](https://yugabyte.atlassian.net/browse/DB-376)
pgtable_id
(nowcolocation_id
) for schemas are haphazardly set.CatalogManager::CreateTable
does not set itRaftGroupMetadata::AddTable
does set itCatalogManager::AlterTable
does set itCatalogManager::AddIndexInfoToTable
does not set itCatalogManager::MarkIndexInfoFromTableForDeletion
does not set itRaftGroupMetadata::SetSchema
does set it (since commit d92b234)Ideally,
pgtable_id
would be set from wherever it originates from: postgres create table and alter table requests to master. That way, we don't have to set it ad hoc on master and tserver. However, this may cause backwards compatibility issues.Another option is to set it from master:
CatalogManager::CreateTable
and ((CatalogManager::AddIndexInfoToTable
andCatalogManager::MarkIndexInfoFromTableForDeletion
) orAsyncAlterTable::SendRequest
). This enables us to get rid of the ad hoc setting at tserver.The text was updated successfully, but these errors were encountered: