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

From: raphi <raphi(at)crashdump(dot)ch>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Looking for a linux tool to automate PG admin tasks
Date: 2025-10-17 12:24:41
Message-ID: 211714f9-5c23-497b-a319-540672077039@crashdump.ch
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

if you don't want to deal with bash scripts and everything that comes
with it (like manually distributing them every time you change
something), you could look into ansible. It's pretty straight forward
once you've got the hang of it and if you have gitlab, you can run the
playbooks in a (scheduled) pipeline. It also scales very well and if you
add new databases automatically to your inventory, you'll never have to
login to a server again. The biggest caveat though is that it needs ssh
access to remotely execute the plays, but if you can install bash
scripts I figure you already have ssh access.

have fun ;)
raphi

Am 16.10.2025 um 15:17 schrieb Jean-Christophe Boggio:
> 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.
> Thanks,
> JC
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message bertrand HARTWIG 2025-10-17 14:36:52 Re: Looking for a linux tool to automate PG admin tasks
Previous Message Ishan Arunkumar Joshi 2025-10-17 11:14:57 RE: postgres server crash with "Segmentation fault"