Re: Race between KeepFileRestoredFromArchive() and restartpoint
Don Seiler <don@seiler.us>
From: Don Seiler <don@seiler.us>
To: David Steele <david@pgmasters.net>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org, Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: 2022-08-02T21:03:42Z
Lists: pgsql-hackers
On Tue, Aug 2, 2022 at 10:01 AM David Steele <david@pgmasters.net> wrote: > > > That makes sense. Each iteration of the restartpoint recycle loop has a > 1/N > > chance of failing. Recovery adds >N files between restartpoints. > Hence, the > > WAL directory grows without bound. Is that roughly the theory in mind? > > Yes, though you have formulated it better than I had in my mind. > > Let's see if Don can confirm that he is seeing the "could not link file" > messages. During my latest incident, there was only one occurrence: could not link file “pg_wal/xlogtemp.18799" to > “pg_wal/000000010000D45300000010”: File exists WAL restore/recovery seemed to continue on just fine then. And it would continue on until the pg_wal volume ran out of space unless I was manually rm'ing already-recovered WAL files from the side. -- Don Seiler www.seiler.us
Commits
-
Skip WAL recycling and preallocation during archive recovery.
- a5b0c06daae9 13.21 landed
- 014a508009df 14.18 landed
- cc2c7d65fc27 15.0 landed
-
Don't ERROR on PreallocXlogFiles() race condition.
- cbed472a9341 13.21 landed
- 675b771ca5f2 14.18 landed
- 2b3e4672f760 15.0 landed
-
Remove XLogFileInit() ability to unlink a pre-existing file.
- d0b6acaf04a2 13.21 landed
- b494640e8297 14.18 landed
- 421484f79c0b 15.0 landed
-
In XLogFileInit(), fix *use_existent postcondition to suit callers.
- 20e5ef3ca70c 13.21 landed
- 8967dddf086e 14.18 landed
- 85656bc3050f 15.0 landed
-
Remove XLogFileInit() ability to skip ControlFileLock.
- df8ec9634ccd 13.21 landed
- 6b168c1299c5 14.18 landed
- c53c6b98d38a 15.0 landed
-
Add HINT for restartpoint race with KeepFileRestoredFromArchive().
- cf86fddc1c92 11.17 landed
- 41f613fc257c 12.12 landed
- 2ffcb7dce806 10.22 landed
- ad8ebcfe9662 13.8 landed
- 8ad6c5dbbe5a 14.5 landed
-
Complete TODO item:
- 63653f7ffaba 7.3.1 cited