Philip Warner <pjw@rhyme.com.au> writes:
> Brian Baquiran in the [GENERAL] list recently asked if it was possible to
> 'throttle-down' pg_dump so that it did not cause an IO bottleneck when
> copying large tables.
> Can anyone see a reason not to pause periodically?
Because it'd slow things down?
As long as the default behavior is "no pauses", I have no strong
objection.
> Finally, can anyone point me to the most portable subsecond timer routines?
You do not want a timer routine, you want a delay. I think using a
dummy select() with a timeout parameter might be the most portable way.
Anyway we've used it for a long time --- see the spinlock backoff code
in s_lock.c.
regards, tom lane