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?
The only problem I have with pausing is that pg_dump runs in a single
transaction, and I have an aversion to keeping TX's open too long, but this
is born of experience with other databases, and may not be relevant to PG.
If it is deemed acceptable, can anyone offer a sensible scheme for pausing?
eg. Allow the user to specify an active:sleep ratio, then after ever 'get'
on the COPY command, see how much time has elaped since it last slept, and
if more than, say, 100ms, then sleep for an amount of time based on the
user's choice.
Finally, can anyone point me to the most portable subsecond timer routines?
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/