Commit eea82b49 authored by Paul Ramsey's avatar Paul Ramsey

Use AccessShareLock in spatial_index_read_extent

References #4261


git-svn-id: http://svn.osgeo.org/postgis/branches/2.5@17168 b70326c6-7e19-0410-871a-916f4a2858ee
parent 5e9a0cad
Pipeline #43802070 passed with stage
in 23 minutes and 31 seconds
......@@ -34,6 +34,8 @@ XXXX/XX/XX
- #4301, ST_Subdivide: fix endless loop on coordinates near coincident to bounds
(Darafei Praliaskouski)
- #4261, Use AccessShareLock in spatial_index_read_extent (Paul Ramsey)
PostGIS 2.5.1
2018/11/18
......
......@@ -2515,7 +2515,7 @@ spatial_index_read_extent(Oid idx_oid, int key_type)
if (!idx_oid)
return NULL;
idx_rel = index_open(idx_oid, AccessExclusiveLock);
idx_rel = index_open(idx_oid, AccessShareLock);
buffer = ReadBuffer(idx_rel, GIST_ROOT_BLKNO);
page = (Page) BufferGetPage(buffer);
offset = FirstOffsetNumber;
......@@ -2527,7 +2527,7 @@ spatial_index_read_extent(Oid idx_oid, int key_type)
if (!iid)
{
ReleaseBuffer(buffer);
index_close(idx_rel, AccessExclusiveLock);
index_close(idx_rel, AccessShareLock);
return NULL;
}
ituple = (IndexTuple) PageGetItem(page, iid);
......@@ -2559,7 +2559,7 @@ spatial_index_read_extent(Oid idx_oid, int key_type)
}
ReleaseBuffer(buffer);
index_close(idx_rel, AccessExclusiveLock);
index_close(idx_rel, AccessShareLock);
if (key_type == STATISTIC_SLOT_2D && bounds_2df)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment