mirror of
https://github.com/postgres/postgres.git
synced 2025-05-20 00:03:14 -04:00
Invalidate smgr_targblock in smgrrelease().
In rare circumstances involving relfilenode reuse, it might have been possible for smgr_targblock to finish up pointing past the end. Oversight in b74e94dc. Back-patch to 15. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/CA%2BhUKGJ8NTvqLHz6dqbQnt2c8XCki4r2QvXjBQcXpVwxTY_pvA%40mail.gmail.com
This commit is contained in:
parent
11f4935490
commit
6337e994e8
@ -296,6 +296,7 @@ smgrrelease(SMgrRelation reln)
|
||||
smgrsw[reln->smgr_which].smgr_close(reln, forknum);
|
||||
reln->smgr_cached_nblocks[forknum] = InvalidBlockNumber;
|
||||
}
|
||||
reln->smgr_targblock = InvalidBlockNumber;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user