public inbox for [email protected]
help / color / mirror / Atom feedFrom: Muhammad Imtiaz <[email protected]>
To: Durgamahesh Manne <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Scheduling pg_repack job with pg_cron
Date: Tue, 30 Jul 2024 16:22:17 +0500
Message-ID: <CACW1Ly1PxOp_i30VLKBNLOius_ahXRx6RRoLVsHE5Rm1w+BUog@mail.gmail.com> (raw)
In-Reply-To: <CAJCZko+-+OwyfKcQ91BJKoaTKuTbqeQ5A3mhw7QneiGhQRCFsQ@mail.gmail.com>
References: <CAJCZko+-+OwyfKcQ91BJKoaTKuTbqeQ5A3mhw7QneiGhQRCFsQ@mail.gmail.com>
Hi ,
Yes, you can use it. Create a bash script containing the pg_repack
command logic, then call this bash script from a PL/pgSQL function.
Finally, schedule this PL/pgSQL function using pg_cron as follows.
SELECT cron.schedule('pg_repack_job', '00 3 * * 1-5', $$SELECT repackfunc();$$);
*Muhammad Imtiaz*
*PostgreSQL Technical Support Lead *
*/ Pakistan R&D*
*Mobile: +923345072521*
*Email: [email protected] <[email protected]>*
On Tue, Jul 30, 2024 at 1:58 PM Durgamahesh Manne <[email protected]>
wrote:
> Hi
> Respected Team
>
> Is there any way to schedule a pg_repack job with pg_cron within the
> instance ?
>
> If yes then please please let me know the best approach to schedule it
> with pg_cron within the instance.( not in bastion host)
>
> your response is highly valuable
>
> Regards.
> Durga Mahesh
>
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], [email protected]
Subject: Re: Scheduling pg_repack job with pg_cron
In-Reply-To: <CACW1Ly1PxOp_i30VLKBNLOius_ahXRx6RRoLVsHE5Rm1w+BUog@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