Invalidate smgr_targblock in smgrrelease().

Thomas Munro <tmunro@postgresql.org>

Commit: d23e60e6673ab946b769d727c62fc65e146f17f3
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2023-08-17T03:54:31Z
Releases: 15.5
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

Files

PathChange+/−
src/backend/storage/smgr/smgr.c modified +1 −0

Discussion