Re: pgAgent Jobs on replica

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Greg Bryant <gregabryant(at)hotmail(dot)com>
Cc: "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: pgAgent Jobs on replica
Date: 2021-04-26 08:07:55
Message-ID: CA+OCxoyihrG5TiucHCnOR-0zWCn-G+AUbB5aRLBVRzUCRjnauQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Sat, Apr 24, 2021 at 6:47 PM Greg Bryant <gregabryant(at)hotmail(dot)com> wrote:

> I have several pgAgent jobs that run on the ‘master’ database. They fail
> on the replica since it’s a ‘read-only’ connection. I’m creating a couple
> jobs to run some bash scripts but I don’t want them to run on the replica
> server.
>
>
>
> Is there a way to prevent pgAgent jobs from executing on the replica
> server? Wrap all the jobs in an ‘if’ statement to check if the server is
> in_recovery? Disable the daemon on the replica server?
>
>
>
> I’m currently running PostgreSQL 11 with pgAgent 4.
>

You can use the Host Agent field to specify a particular node that a job
should run on - see
https://www.pgadmin.org/docs/pgadmin4/5.2/pgagent_jobs.html

--
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Greg Bryant 2021-04-26 14:44:36 RE: pgAgent Jobs on replica
Previous Message Fahar Abbas 2021-04-25 23:14:51 Re: The pgAdmin 4 server could not be contacted: