public inbox for [email protected]
help / color / mirror / Atom feedFrom: hubert depesz lubaczewski <[email protected]>
To: Sathish Reddy <[email protected]>
Cc: [email protected]
Subject: Re: Pg_repack
Date: Tue, 6 Aug 2024 13:15:33 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+M9Y+A7mUFRELeOu0g-3J+bgvf_wmuyhb+rE9X3KvLr7XQh9w@mail.gmail.com>
References: <CA+M9Y+A7mUFRELeOu0g-3J+bgvf_wmuyhb+rE9X3KvLr7XQh9w@mail.gmail.com>
On Tue, Aug 06, 2024 at 04:39:53PM +0530, Sathish Reddy wrote:
> We planning to create store procedure (function) in postgres database to
> run pg_repack on removing bloating of table or index by using within
> postgres instance.
> Please help me on details on steps with example for same.
That will be impossible and/or hard.
The problem is that stored procedure/functions runs in database. and
pg_repack is external program, that *does stuff in database*, but it not
*all* in database.
It's kinda as if you wanted to make stored procedure to run photoshop.
You can kinda work around it by using some PL/* language that allows
external program execution, but it is extremely unlikely to do what
you'd think it will do.
Best regards,
depesz
view thread (14+ messages) latest in thread
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], [email protected]
Subject: Re: Pg_repack
In-Reply-To: <[email protected]>
* 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