mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03: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
1bc19dfcfe
commit
d23e60e667
@ -292,6 +292,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