Update pgxn/neon/pagestore_smgr.c

Co-authored-by: Heikki Linnakangas <heikki@neon.tech>
This commit is contained in:
Konstantin Knizhnik
2025-07-22 18:51:46 +03:00
committed by Konstantin Knizhnik
parent 4580391963
commit 4885621e55

View File

@@ -1630,9 +1630,7 @@ neon_write(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, const vo
*/
LWLockAcquire(finish_unlogged_build_lock, LW_SHARED);
is_locked = true;
/*
* Recheck relperst under lock - may be unlogged build is already finished
*/
/* Recheck now that we hold the lock - the build might already have finished */
relperst = get_cached_relperst(rinfo);
}
if (relperst == NEON_RELPERSISTENCE_UNLOGGED || relperst == NEON_RELPERSISTENCE_UNLOGGED_BUILD)