Skip to content

Commit

Permalink
Reduce unnecessary scanner lock during read
Browse files Browse the repository at this point in the history
Catalog read performed on the chunk table is getting
RowExclusiveLock while only reading the data. Reducing
to AccessShareLock will bring this in line with PG
locking convention.
  • Loading branch information
antekresic committed Feb 27, 2024
1 parent 671633c commit c81ddeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3143,7 +3143,7 @@ List *
ts_chunk_get_chunk_ids_by_hypertable_id(int32 hypertable_id)
{
List *chunkids = NIL;
ScanIterator iterator = ts_scan_iterator_create(CHUNK, RowExclusiveLock, CurrentMemoryContext);
ScanIterator iterator = ts_scan_iterator_create(CHUNK, AccessShareLock, CurrentMemoryContext);

init_scan_by_hypertable_id(&iterator, hypertable_id);
ts_scanner_foreach(&iterator)
Expand Down

0 comments on commit c81ddeb

Please sign in to comment.