Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uLe43-00DeCP-O3 for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Jun 2025 08:29:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uLe32-001hMW-G6 for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Jun 2025 08:28:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uLe32-001hMO-4o for pgsql-hackers@lists.postgresql.org; Sun, 01 Jun 2025 08:28:04 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uLe30-000zuD-1Q for pgsql-hackers@lists.postgresql.org; Sun, 01 Jun 2025 08:28:03 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3a3758b122cso2233378f8f.1 for ; Sun, 01 Jun 2025 01:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748766481; x=1749371281; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k4ZTRFGgRhiL0vbDb18FQfOdyGzY4m48RYNj+BQkLVI=; b=ZnWOo2Ls3zyLtfBGJYFTTPfyn1PZQZdzi44mtYgqkYlYKSiviufAOY3eWI+0EeYYJi C9eZkPSJeAmNDh8p3wWI900nsRHNrqz1ytzAGECXiyDMu7tV4ooFT9psQzqnnP2ONsJd m3ganAC5nrpyplgE/DVV7sfh/+Yo5DmRsF/4DdsnWwJtGIYvBKCIDIFe+WHdxg8+mdMm pYQW3VpgeSYr0ZpHr2WnmrxfV86Ds05v6efrojgWQQyO9GOfV8tcJ6uRkqRGIAxSzJ/e zd8KinnS8BaF2NaanMeeuZ5K0qNGyTbq1C7qE3OCpMRrsXSwfl8wROqgl2kJoy/nHcrg LdtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748766481; x=1749371281; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k4ZTRFGgRhiL0vbDb18FQfOdyGzY4m48RYNj+BQkLVI=; b=P2NVfU+ZIxV3aQRQ5aqnidQ2L6wvcLmV8gz+2FNFO8QRew2XNP5At6AgFsxiwLuhKp 1tYYKY8tA3+CozGpXhqnUcqvMRoI8gUFmE8JrPJQHP6EnBNkjE5npwjwac5jcX/XnHXN wXn3LNiEWFHvffjAp2fbHR9dhNJ6x5ZAEWKD3mg54t+ZiNn/M+c4kVnQc0s0StCQhkAf w3hxQ4SlD4/UJZgs2j8VpHFYhXu4lkzEV2H5xZ/gxZAoIYZdzuTgQnB7CrT5iRLqt+1L Z2RB7nh9NMFXU5SZI5kIOXi9ezq9PaMFTbuRWXC+sx19e1C4ZCS7FR1SL6QYK3lOK6af Z4iQ== X-Forwarded-Encrypted: i=1; AJvYcCUbT0YTE2f0EUnunqNBdQpGjQDKpjPP6RC6fpqe2lomyhaSm2ci9LtFX8w7vJm6uSwz/PFTrcc7bRBOm0RG@lists.postgresql.org X-Gm-Message-State: AOJu0YzvBNKpEiSp5bHUoPHAHkjSe+AYwBhpyzy2GpaU4fUTbhLbIHRe QQBaok4N10rMdiG1mT1MPpblI5yAZVwLQUrVXuxyoCNYyYPyhyGzx/cC X-Gm-Gg: ASbGncsUSuCIoay54eneZQy/DAx8a06ocGICy11vtYybbJkVSKBDpg6zC8NqOtSC8S+ heH/YgWE/At4DQyTwxvkTulNipHD3dGHPRkJYYMcvk8i2eK31xp/xLMJSPrSdEUTmV2EsfY5dhf W4Ck20xccGJ/+DYrdTeUu3osxMJFbRTds/POQg5k5yRM/JYiXuvYZz/GVSfJpZgINiZ5rYoJ3wB HX4TBrrRGEFhKobPK+G7kgtegt4OZHBbNNrjbDacRi0Qnl9siunM17UsEEUMnpxC6u0OzS2ns4u FH2RsXUPElrT4MPlTwtCVxtGNJ3VHXcZZ/wck94onVFtMo+jelvobJ1E4sjaYNewXdIDy3l4yZO vkw== X-Google-Smtp-Source: AGHT+IHPLpgPajCegNJPxf6jtrJZem8yo/lqBlhLOZD+1rUCVrG1fqW0C1HQ7D8aRnWaqxs5rFDJqw== X-Received: by 2002:a05:6000:230d:b0:3a0:b84c:7c64 with SMTP id ffacd0b85a97d-3a4f7a4c84bmr7050230f8f.13.1748766480658; Sun, 01 Jun 2025 01:28:00 -0700 (PDT) Received: from smtpclient.apple ([145.224.119.224]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4f009ff7asm10868809f8f.90.2025.06.01.01.27.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jun 2025 01:27:59 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: Proposal: Job Scheduler From: Florents Tselai In-Reply-To: Date: Sun, 1 Jun 2025 11:27:27 +0300 Cc: Nikolay Samokhvalov , Andrei Lepikhov , =?utf-8?Q?=C3=81lvaro_Herrera?= , Dave Page , Dmitry Dolgov <9erthalion6@gmail.com>, Laurenz Albe , Wang Cheng <348448708@qq.com>, pgsql-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <5B574238-1F51-452B-9A2E-1C6C93468C51@gmail.com> References: <202406061053.nrg23pctc6wm@alvherre.pgsql> <1763c6c6-cf71-4e64-bd47-0451c5334358@gmail.com> To: Adam Brusselback X-Mailer: Apple Mail (2.3826.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 30 May 2025, at 5:24=E2=80=AFPM, Adam Brusselback = wrote: >=20 > Add me to the +1 for having a built-in scheduler. It's useful for = plenty of things like automated partition creation (as noted), = scheduling backups, index maintenance, batch processing jobs, etc... >=20 > I wrote jpgAgent (compatible with pgAgent) ~10 years ago because = pgAgent was too unstable (and the other scheduling tools hadn't come out = yet), but I really wish I didn't have to deal with external tooling for = features like this at all. I could see an argument of adopting pg_cron as a contrib/ module to the = core; not only because it=E2=80=99s become the standard, but it=E2=80=99s a = nice example of an extension using bgworker. But having it in core? I don=E2=80=99t think so; It=E2=80=99s way beyond = the scope of an RDBMS, which already has transactions and SKIP LOCKED, and I think that=E2=80=99s= as fast as it should go.=