CDB-3098 Cherry-picked search_path definition commits from CDB-2939