Re: Can I pause the pg_dump or pg_restore

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Can I pause the pg_dump or pg_restore
Дата
Msg-id gv3add$bov$2@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Can I pause the pg_dump or pg_restore  ("Chen, Dongdong (GE Healthcare)" <DongdongChen@ge.com>)
Список pgsql-general
On 2009-05-20, Chen, Dongdong (GE Healthcare) <DongdongChen@ge.com> wrote:
> This is a multi-part message in MIME format.
>
> In my application, when press button "Backup" in UI, it invokes pg_dump
> to backup the database. It may take few minutes for the whole process.
> If I want to pause the process, what should I do. And also how to resume
> the process? Can I pause while pg_restore?

POSIX has SIGSTOP and SIGCONT. you could send them to the pg_dump task
using kill() if you have permission (invoker does) and its PID.

as others have you can also force the process to pause by throttleing it's
I/O.

if you invoke pg_dump using popen() (or similar)
when you stop reading the output pg_dump will (after filling the
buffer) also stop and wait for you to resume reading.

the converse is true when restoring.

Windows may have similar features available, no doubt with different
names and APIs.

В списке pgsql-general по дате отправления:

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Can not decompress a compressed string under plpy!
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Can I pause the pg_dump or pg_restore