Re: Pg_repack

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Sathish Reddy <sathishreddy(dot)postgresql(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Pg_repack
Date: 2024-08-06 11:15:33
Message-ID: ZrIF1SiEGC_Ghsrr@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

  • Pg_repack at 2024-08-06 11:09:53 from Sathish Reddy

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sathish Reddy 2024-08-06 11:20:33 Re: Pg_repack
Previous Message Sathish Reddy 2024-08-06 11:09:53 Pg_repack