Skip to content

Commit d1362a6

Browse files
committed
pathman: wrong lock on init_dsm_segment
1 parent 50da149 commit d1362a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_pathman/dsm_array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ init_dsm_segment(size_t blocks_count, size_t block_size)
6969
bool ret;
7070

7171
/* lock here */
72-
LWLockAcquire(pmstate->load_config_lock, LW_EXCLUSIVE);
72+
LWLockAcquire(pmstate->dsm_init_lock, LW_EXCLUSIVE);
7373

7474
/* if there is already an existing segment then attach to it */
7575
if (dsm_cfg->segment_handle != 0)
@@ -100,7 +100,7 @@ init_dsm_segment(size_t blocks_count, size_t block_size)
100100
*/
101101
dsm_pin_mapping(segment);
102102
/* unlock here */
103-
LWLockRelease(pmstate->load_config_lock);
103+
LWLockRelease(pmstate->dsm_init_lock);
104104

105105
return ret;
106106
}

0 commit comments

Comments
 (0)