Heikki Linnakangas wrote: > - The signaling between RequestCheckpoint and bgwriter is a bit tricky. > Bgwriter now needs to deal immediate checkpoint requests, like those > coming from explicit CHECKPOINT or CREATE DATABASE commands, differently > from those triggered by checkpoint_segments. I'm afraid there might be > race conditions when a CHECKPOINT is issued at the same instant as > checkpoint_segments triggers one. What might happen then is that the > checkpoint is performed lazily, spreading the writes, and the CHECKPOINT > command has to wait for that to finish which might take a long time. I > have not been able to convince myself neither that the race condition > exists or that it doesn't.
Isn't it just a matter of having a flag to tell whether the checkpoint should be quick or spread out, and have a command set the flag if a checkpoint is already running? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend