public inbox for [email protected]  
help / color / mirror / Atom feed
From: Roland Müller <[email protected]>
To: pgsql-admin <[email protected]>
Subject: Re: Looking for a linux tool to automate PG admin tasks
Date: Fri, 17 Oct 2025 07:16:24 +0300
Message-ID: <CA+8p0G3o+nOXtiEBAEWntxpqjep-SRBVTtT0+NhEAdzTUWXcpw@mail.gmail.com> (raw)
In-Reply-To: <CANzqJaAo8XiBTFrAKUSUwGseF1vHSR2hYW-Fod9ZqEhAuA7Frg@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CANzqJaAo8XiBTFrAKUSUwGseF1vHSR2hYW-Fod9ZqEhAuA7Frg@mail.gmail.com>

May be Ansible? There is a dedicated module for Postgresql and a lot of
modules for general tasks such as installation etc.
https://docs.ansible.com/ansible/latest/collections/community/postgresql/index.html

Br
Roland

Ron Johnson <[email protected]> ezt írta (időpont: 2025. okt. 16., Cs
17:12):

> On Thu, Oct 16, 2025 at 9:46 AM hubert depesz lubaczewski <
> [email protected]> wrote:
>
>> 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.
>>
>
> Ditto.  bash scripts are only ugly if you write ugly bash.
>
> --
> Death to <Redacted>, and butter sauce.
> Don't boil me, I'm still alive.
> <Redacted> lobster!
>


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Looking for a linux tool to automate PG admin tasks
  In-Reply-To: <CA+8p0G3o+nOXtiEBAEWntxpqjep-SRBVTtT0+NhEAdzTUWXcpw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox