On Thu, May 17, 2018 at 09:57:59AM -0400, Robert Haas wrote:
> I think you and Tom have misunderstood each other somehow. If you
> look at CommitTransaction(), you will see a comment that says:
Oh, I understood. You are right.
> Also, there is no absolute prohibition on kernel calls in post-commit
> cleanup, or in no-fail code in general.
Thank you for the explanation!
The current approach depends on syscache callbacks anyway. Backend 2
(from the example above) knows is it necessary to unpin segments after
syscache callback was called. Tom pointed below that callbacks are
occured in various events. So I think I should check the current approach
too using CLOBBER_CACHE_ALWAYS. It could show some problems in the
current patch.
Then if everything is OK I think I'll check another approach (unmapping
in TS syscache callback) using CLOBBER_CACHE_ALWAYS.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company