Set maintenance work mem for pg_restore

Поиск
Список
Период
Сортировка
От Deron
Тема Set maintenance work mem for pg_restore
Дата
Msg-id ad143ba80712181230q3b5002b5wa1a90b304ef0e2f2@mail.gmail.com
обсуждение исходный текст
Ответы Re: Set maintenance work mem for pg_restore  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Set maintenance work mem for pg_restore  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Set maintenance work mem for pg_restore  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
I see a lot of suggestions to increase maintenance work mem if running pg_restore.  This is to help with the index creation and initial sort from what I understand.  A few tests I ran does show this helps.
Does anyone know if there is a way to only "temporarily" set this setting?  I have some DBs that are bloated and I have a script to run off hours (I don't like working late).  This uses pg_dump and pg_restore to recover the disk space.  I found that this is usually faster than 'vacuum full', and is useful in some cases.
 
I know I can set this for my current session dynamically "set maintenance_work_mem = xxxxx", but it seems that the only way I can do this for pg_restore is to update the configuration, reload and then change it back when the script completes and reload again.
 
Thanks
 
Deron
 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Warm-standby robustness question
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Set maintenance work mem for pg_restore