mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #34416 from kssenii/fixing-postgresql-replica-test-1
Fix test test_postgresql_replica_database_engine_2/test.py::test_table_schema_changes_2
This commit is contained in:
commit
15bcbb97e5
@ -277,10 +277,16 @@ Pipe StorageMaterializedPostgreSQL::read(
|
||||
size_t max_block_size,
|
||||
unsigned num_streams)
|
||||
{
|
||||
auto materialized_table_lock = lockForShare(String(), context_->getSettingsRef().lock_acquire_timeout);
|
||||
auto nested_table = getNested();
|
||||
return readFinalFromNestedStorage(nested_table, column_names, metadata_snapshot,
|
||||
|
||||
auto pipe = readFinalFromNestedStorage(nested_table, column_names, metadata_snapshot,
|
||||
query_info, context_, processed_stage, max_block_size, num_streams);
|
||||
|
||||
auto lock = lockForShare(context_->getCurrentQueryId(), context_->getSettingsRef().lock_acquire_timeout);
|
||||
pipe.addTableLock(lock);
|
||||
pipe.addStorageHolder(shared_from_this());
|
||||
|
||||
return pipe;
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,6 +57,7 @@ Pipe readFinalFromNestedStorage(
|
||||
|
||||
Pipe pipe = nested_storage->read(require_columns_name, nested_metadata, query_info, context, processed_stage, max_block_size, num_streams);
|
||||
pipe.addTableLock(lock);
|
||||
pipe.addStorageHolder(nested_storage);
|
||||
|
||||
if (!expressions->children.empty() && !pipe.empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user