**Describe the issue**

Improve feedback when trying to replace a partition with a different index

**Which ClickHouse server version to use**

21.9.5


**How to reproduce**

```
DROP DATABASE IF EXISTS test;

CREATE DATABASE test;

CREATE TABLE test.A (id UInt32, company UInt32, total UInt64) ENGINE=SummingMergeTree() PARTITION BY company PRIMARY KEY (id) ORDER BY (id, company);

INSERT INTO test.A SELECT number%10 as id, number%2 as company, count() as total FROM numbers(100) GROUP BY id,company;

CREATE TABLE test.B (id UInt32, company UInt32, total UInt64) ENGINE=SummingMergeTree() PARTITION BY company ORDER BY (id, company);

ALTER TABLE test.B REPLACE PARTITION '0' FROM test.A;

```

**Error message and/or stacktrace**

```
Received exception from server (version 21.9.5):
Code: 33. DB::Exception: Received from localhost:9000. DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 4.. (CANNOT_READ_ALL_DATA)
(query: ALTER TABLE test.B REPLACE PARTITION '0' FROM test.A;)
````

**Expected behavior**

```
Code: 33. DB::Exception: Received from localhost:9000. DB::Exception: Cannot replace partition different index (CANNOT_REPLACE_PARTITION)
(query: ALTER TABLE test.B REPLACE PARTITION '0' FROM test.A;)
```

}
            break;
            case PartitionCommand::UNFREEZE_ALL_PARTITIONS:
            {
                auto lock = lockForShare(query_context->getCurrentQueryId(), query_context->getSettingsRef().lock_acquire_timeout);
                current_command_results = unfreezeAll(command.with_name, query_context, lock);
            }
            break;
            default:
                throw Exception("Uninitialized partition command", ErrorCodes::LOGICAL_ERROR);
        }
        for (auto & command_result : current_command_results)
            command_result.command_type = command.typeToString();
        result.insert(result.end(), current_command_results.begin(), current_command_results.end());
    }
    if (query_context->getSettingsRef().alter_partition_verbose_result)
        return convertCommandsResultToSource(result);
    return {};
}
void MergeTreeData::backupData(BackupEntriesCollector & backup_entries_collector, const String & data_path_in_backup, const std::optional<ASTs> & partitions)
{
    auto local_context = backup_entries_collector.getContext();
    DataPartsVector data_parts;
    if (partitions)
        data_parts = getVisibleDataPartsVectorInPartitions(local_context, getPartitionIDsFromQuery(*partitions, local_context));
    else
        data_parts = getVisibleDataPartsVector(local_context);
    backup_entries_collector.addBackupEntries(backupParts(data_parts, data_path_in_backup, local_context));
}
BackupEntries MergeTreeData::backupParts(const DataPartsVector & data_parts, const String & data_path_in_backup, const ContextPtr & local_context)