Hi,
Here's a bunch of comments on this (hopefully the latest?) version of
the patch:
* I'm not sure I like the FileWrite & FlushBuffer API changes. Do you forsee other callsites needing similar logic?
Wouldn'tit be just as easy to put this logic into the checkpointing code?
* We don't do one-line ifs; function parameters are always in the same line as the function name
* Wouldn't a binary heap over the tablespaces + progress be nicer? If you make the sorting criterion include the
tablespaceid you wouldn't need the lookahead loop in NextBufferToWrite(). Isn't the current approach O(NBuffers^2) in
theworst case?
Greetings,
Andres Freund