neondatabase / postgres

PostgreSQL in Neon
https://neon.tech/docs/reference/compatibility
Other
26 stars 11 forks source link

Fix zenith_test_evict mode and clear_buffer_cache() function (v15) #420

Closed hlinnaka closed 4 months ago

hlinnaka commented 4 months ago

Using InvalidateBuffer is wrong, because if the page is concurrently dirtied, it will throw away the dirty page without calling smgwrite(). In Neon, that means that the last-written LSN update for the page is missed.

In v16, use the new InvalidateVictimBuffer() function that does what we need. In v15 and v14, backport the InvalidateVictimBuffer() function.

Fixes issue https://github.com/neondatabase/neon/issues/7802