Обсуждение:

Поиск
Список
Период
Сортировка

От
Sonam Sharma
Дата:
Is there any option to run reindex or vaccum in background?
Every time the session gets logged off in between.

Re:

От
Fabio Pardi
Дата:
Hi,


if you have access to the OS, then you have plenty of options.

Else, I think pg_cron might do the job


regards,

fabio pardi



On 28/08/2019 08:58, Sonam Sharma wrote:
> Is there any option to run reindex or vaccum in background?
> Every time the session gets logged off in between.



Re:

От
"David G. Johnston"
Дата:
On Tue, Aug 27, 2019 at 11:59 PM Sonam Sharma <sonams1209@gmail.com> wrote:
Is there any option to run reindex or vaccum in background?
Every time the session gets logged off in between.

There is not - though you can make your auto-vacuum parameters super aggressive.

I'm having trouble imagining a scenario where running reindex or vacuum arbitrarily at session end would be a useful thing.

David J.

Re:

От
Tom Lane
Дата:
Sonam Sharma <sonams1209@gmail.com> writes:
> Is there any option to run reindex or vaccum in background?
> Every time the session gets logged off in between.

If your session is getting killed by a network idle-time timeout,
you could probably prevent that with suitable adjustment of the
server's TCP-keepalive settings.

            regards, tom lane