mirror of
https://github.com/postgres/postgres.git
synced 2025-06-10 09:21:54 +03:00
Fix relcache invalidation when relfilelocator is updated
In commit af0e7deb4a, I removed a call to RelationCloseSmgr(), because the dangling SMgrRelation was no longer an issue. However, we still need the call when the relation's relfilelocator changes, so that the new relfilelocator takes effect immediately. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://www.postgresql.org/message-id/987b1c8c-8c91-4847-ca0e-879f421680ff%40gmail.com
This commit is contained in:
parent
90fe7b74df
commit
441ef5e1ba
3
src/backend/utils/cache/relcache.c
vendored
3
src/backend/utils/cache/relcache.c
vendored
@ -3060,7 +3060,10 @@ RelationCacheInvalidate(bool debug_discard)
|
||||
* map doesn't involve any access to relcache entries.
|
||||
*/
|
||||
if (RelationIsMapped(relation))
|
||||
{
|
||||
RelationCloseSmgr(relation);
|
||||
RelationInitPhysicalAddr(relation);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add this entry to list of stuff to rebuild in second pass.
|
||||
|
Loading…
x
Reference in New Issue
Block a user