1
0
mirror of https://github.com/timescale/timescaledb.git synced 2025-05-23 06:22:03 +08:00

Replace heap_endscan to table_endscan

This commit is contained in:
Fabrízio de Royes Mello 2023-05-31 14:49:38 -04:00
parent 1a93c2d482
commit 4cef387f85
5 changed files with 9 additions and 9 deletions
src
test/src/bgw
tsl/src/compression

@ -1498,7 +1498,7 @@ timescaledb_move_from_table_to_chunks(Hypertable *ht, LOCKMODE lockmode)
copy_table_to_chunk_error_callback,
scandesc);
copy_chunk_state_destroy(ccstate);
heap_endscan(scandesc);
table_endscan(scandesc);
UnregisterSnapshot(snapshot);
table_close(rel, lockmode);

@ -1317,7 +1317,7 @@ relation_has_tuples(Relation rel)
MakeSingleTupleTableSlot(RelationGetDescr(rel), table_slot_callbacks(rel));
bool hastuples = table_scan_getnextslot(scandesc, ForwardScanDirection, slot);
heap_endscan(scandesc);
table_endscan(scandesc);
ExecDropSingleTupleTableSlot(slot);
return hastuples;
}

@ -368,7 +368,7 @@ populate_database_htab(HTAB *db_htab)
* connections or are templates */
db_hash_entry_create_if_not_exists(db_htab, pgdb->oid);
}
heap_endscan(scan);
table_endscan(scan);
table_close(rel, AccessShareLock);
CommitTransactionCommand();

@ -56,7 +56,7 @@ params_register_dsm_handle(dsm_handle handle)
fd->handle = handle;
ts_catalog_update(rel, tuple);
heap_freetuple(tuple);
heap_endscan(scan);
table_endscan(scan);
table_close(rel, RowExclusiveLock);
}
@ -77,7 +77,7 @@ params_load_dsm_handle()
fd = (FormData_bgw_dsm_handle *) GETSTRUCT(tuple);
handle = fd->handle;
heap_freetuple(tuple);
heap_endscan(scan);
table_endscan(scan);
table_close(rel, RowExclusiveLock);
return handle;

@ -495,7 +495,7 @@ compress_chunk_sort_relation(Relation in_rel, int n_keys, const ColumnCompressio
}
}
heap_endscan(heapScan);
table_endscan(heapScan);
/* Perform an analyze on the chunk to get up-to-date stats before compressing.
* We do it at this point because we've just read out the entire chunk into
@ -689,7 +689,7 @@ table_scan_sequence_number(Relation table_rel, int16 seq_num_column_num, ScanKey
}
}
heap_endscan(heap_scan);
table_endscan(heap_scan);
return max_seq_num;
}
@ -1396,7 +1396,7 @@ decompress_chunk(Oid in_table, Oid out_table)
row_decompressor_decompress_row(&decompressor, NULL);
}
heap_endscan(heapScan);
table_endscan(heapScan);
FreeBulkInsertState(decompressor.bistate);
MemoryContextDelete(decompressor.per_compressed_row_ctx);
@ -2035,7 +2035,7 @@ decompress_batches_for_insert(ChunkInsertState *cis, Chunk *chunk, TupleTableSlo
Assert(result == TM_Ok);
}
heap_endscan(heapScan);
table_endscan(heapScan);
ts_catalog_close_indexes(decompressor.indexstate);
FreeBulkInsertState(decompressor.bistate);