Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kb3p1-0005Yb-Gk for pgsql-general@arkaria.postgresql.org; Fri, 06 Nov 2020 15:38:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kb3p0-0003y4-67 for pgsql-general@arkaria.postgresql.org; Fri, 06 Nov 2020 15:38:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kb3oy-0003xx-Dz for pgsql-general@lists.postgresql.org; Fri, 06 Nov 2020 15:38:37 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kb3ot-0006KT-Cg for pgsql-general@postgresql.org; Fri, 06 Nov 2020 15:38:35 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id EDEC05C023D; Fri, 6 Nov 2020 10:38:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 06 Nov 2020 10:38:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=G gUdYoAIqB76DvqNqDS56rbvg4d1rvYCLYgoH0MeuDI=; b=oLu1ll49026O2Dt8E 9BnRC59ZqdUE5nlJITQKrdSLHeuASVb0VLSuxgFoRX/J+5zYXaryWYib0ZxUSRqm ssrKVkP7XtfEalGZDukLSgt0HpxOjDwb+Clf73MFUH/8JuUW80TuZcEiLYy7NI9N rzuMPLqJ+WKZQwstWSj/M0ga6I1kz6OOnqdCLdhwQ7Rz15r8zas0EPbEfM+jOuiJ UwLx7mkDXs8992ZU2y2HtTNLO73/f5uKWhpjn0VvjzOE6v6SQ227WI/cnXbdv5wV WXryTs3c1DyjVkzvFgFzPq0bISv0w1n1jwvC3UeZ3PRooHzyCZwFBZlRviOI+76f 18W2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GgUdYoAIqB76DvqNqDS56rbvg4d1rvYCLYgoH0Meu DI=; b=NTUKAuvnn5eixifOX4exjC8155yOAOpPig8srfoCacBrNjXcPnt8+cF0w Lsek6KfkB3QtSuKGHVAeaHZYiL95ImuwPPNAGgugOUhAlbm6LYoO04WNztELgB3i +MRqFVk0289UMZmdj412uriyoYHWgZpIMsKcdazOIzf/u+ZlfM6damaVm3Fq6ipA pHwt/IBhk3pekZoGJwBFign69LroAwHJgS8kU4AFuhwbCFT+9CEH2SVRDoLbnzUa DeOALoemefepadDtqNyOz5uO6wypfdoPP5uoqo2uG97DZtIwdp4bF2X1hu2+HSVE kfcvL3zPoPn1XAdowXCLnAZOMB8YA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtledgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevkeffgedufefghfffjefhtdejudfhveetueeigeek gedtjedvfeetledutdevieenucffohhmrghinheptghithhushgurghtrgdrtghomhenuc fkphepjeehrddujedvrdduledrudefleenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrd gtohhm X-ME-Proxy: Received: from [192.168.1.4] (75-172-19-139.tukw.qwest.net [75.172.19.139]) by mail.messagingengine.com (Postfix) with ESMTPA id 4A3153280261; Fri, 6 Nov 2020 10:38:29 -0500 (EST) Subject: Re: pgagent To: Gabi Draghici Cc: pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <233ea395-0a07-d186-a725-ff3e080d5d5f@aklaver.com> Date: Fri, 6 Nov 2020 07:38:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/6/20 4:26 AM, Gabi Draghici wrote: > Hi, > > 1. The job it's a simple call to one stored function like that : > BEGIN >  CALL other_user_name.get_function(); > END; > Problem is that despite the fact that it's long passed by the scheduled > running time and I tried the "Run now" option (from pgadmin) a couple of > times, there is no evidence that the job actually runned ! Nothing in > pgagent log, main log or in pgagent.pga_joblog or pgagent.pga_jobsteplog. > Is there any way to trace of debug this ? Is the pgagent daemon running? You could crank up the the log_statement to 'all'(temporarily as this can generate a lot of logs) in postgresql.conf and reload the server. Then tail the Postgres log file when click on 'Run now' to see what happens. > > 2. Yes, pg_cron also looks good and it's my second option if I can't > make 1 to work. > > Regards, > Gabi > > > On Thu, Nov 5, 2020 at 11:34 PM Adrian Klaver > wrote: > > On 11/5/20 1:07 PM, Gabi Draghici wrote: > > > > Hi, > > > > I have installed postgresql 12 on sles 15 for some tests. Now I'm > > interested in some sort of scheduler and from what I've read so far, > > pgagent should do the job. So I've installed pgagent 4.0. I've > added a > > job (which I can see in pgagent.pga_job) but everytime I ran it > (from > > pgadmin) nothing happens ! When I start the pgagent I can see "... > > pgagent ... connection authorized" in the main log. What else > should I > > check ? > > pg_cron: > > https://www.citusdata.com/blog/2020/10/31/evolving-pg-cron-together/ > > > For pgagent what is the job doing and when? Could it be it hasn't run > because it has not reached it's scheduled time. > > > > > Thanks, > > Gabi > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com