Re: pg_dump & performance degradation

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Philip Warner <pjw@rhyme.com.au>
Cc: pgsql-hackers@postgresql.org, brianb-pggeneral@edsamail.com
Date: 2000-07-28T16:22:37Z
Lists: pgsql-hackers
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