neondatabase / postgres

PostgreSQL in Neon
https://neon.tech/docs/reference/compatibility
27 stars 12 forks source link

Fix zenith_test_evict mode and clear_buffer_cache() function (v14) #421

Closed hlinnaka closed 6 months ago

hlinnaka commented 6 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