mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 02:20:42 +00:00
The single-threaded copytree to create the snasphot was by far the costliest part of creating the snapshot in my 20k tenants example. As part of this change, also fix when we do overlayfs teardown. We want to do it after the log-checking has happened. Actually, we want it to happen even if `not self.env`. However, that means the local storage cleanups would do a lot of useless work if we mounted a large snapshot via overlayfs. So, make the local storage cleanup skip files on overlayfs mounts. All storage used by the changes in the overlayfs will be cleared by overlayfs teardown.