Re: Looking for a linux tool to automate PG admin tasks

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Looking for a linux tool to automate PG admin tasks
Дата
Msg-id aPD3JdsnLaQ6gEY0@depesz.com
обсуждение исходный текст
Ответ на Looking for a linux tool to automate PG admin tasks  (Jean-Christophe Boggio <postgresql@thefreecat.org>)
Ответы Re: Looking for a linux tool to automate PG admin tasks
Список pgsql-admin
On Thu, Oct 16, 2025 at 03:17:16PM +0200, Jean-Christophe Boggio wrote:
> Hello,
> I have several servers with many databases on them for different
> applications.
> I need to execute some tasks on some databases depending on some criteria.
> For example, execute query xxx but only on databases where table
> public.sometable exists or if number of rows in table yyy is > 1M.
> Before reinventing the wheel with ugly bash scripts, do you know of some
> tools that would suit my case ?
> Some tasks will have to execute periodically (with crons probably) and
> others will be one-off.
> CLI tools if possible because I'm working remotely on those servers of
> course.

Well, I'd just use psql, with some simple script using \gexec
functionality. Solves virtually any problem of this kind.

Best regards,

depesz




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