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 1lRyEh-0005Sw-R2 for pgsql-general@arkaria.postgresql.org; Thu, 01 Apr 2021 14:23:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRyEg-0001xE-Pn for pgsql-general@arkaria.postgresql.org; Thu, 01 Apr 2021 14:23:50 +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 1lRyEg-0001x7-Ff for pgsql-general@lists.postgresql.org; Thu, 01 Apr 2021 14:23:50 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lRyEc-0002XB-I3 for pgsql-general@lists.postgresql.org; Thu, 01 Apr 2021 14:23:49 +0000 Received: by mail-pg1-x52b.google.com with SMTP id t140so1597272pgb.13 for ; Thu, 01 Apr 2021 07:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=PF9Ay9zQWT5suf457FwuwchFamvdrbEdPgSyUvoG02Q=; b=m3757KcC5WJ/HHKWo0CQgbhrXJRuTupffxkvkxD/deysxQQYr0pxvnPVrnzGm+YQm/ i2oJgsp5pI+LWwxFpcYhY6x4KhfMXRFuUWlpv3TnAPfAfL+gxlBC36OdDc4aKBWrSRgn mAQYEDWVt/ndhiOsYK4iBhbXyKEzsK4nfc1U6kp6qY1FtnVIlPTpnP56jY/VIw291su9 44lkKQkPyN2+m3X2axoPo//jehiE5uPNIlBMsy7omP5KpQ9uqbZb5nTy9j0c0LF28mFy 9SJJQxUIZzK5NjRr1KpRmuRWLRtf1TflPOUjNkAwZ/97Ba9VGO5sL82cre6n7R/0cvv4 zYFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=PF9Ay9zQWT5suf457FwuwchFamvdrbEdPgSyUvoG02Q=; b=hXUddt8stDqA35asauK/NNg6fXaoZK2DRnxcBWpBfaK9ooWhW1ncHj164h5mhu1zk6 8RRMH0SFxMGMeYjZC39iSMXDQNAEWo23QWzM4wyi0oEOlNo22FkY+Mu3s+8hIoiVSq2l KluWoJSo5bbxzRteqqde94eLhKcwtK3Jb3DGRq2dX8MX5xVxTCmsjyLdG8aaaFhtMDWX SZ3f+YI3AqsmkWlfuVxi0OMO4Ve96LHiRAzxcLRp9KeIrfF4EXhkQg3vONcdb2q85eQH BRK4szZdAe4DbLu/TMpZj1mv7i8c1vxfSLiSSrR2jeCQHCASPFnuI5dovihTx7U40Qdr Elqg== X-Gm-Message-State: AOAM531TZrY9wSwdZCAP33hZTaHHDyxwlHAfKBGI4vFaXlrHIyygvKgN GoSBDss6FOCngt5/nSFZG6c= X-Google-Smtp-Source: ABdhPJyYF/qWLSEw29YFT3y/+MybexkbAlEIIC23Beyfgo15TEBouVW2tpHNf5xXPoZzghUDU5//IQ== X-Received: by 2002:aa7:9431:0:b029:1f1:52fd:5444 with SMTP id y17-20020aa794310000b02901f152fd5444mr7679112pfo.47.1617287025418; Thu, 01 Apr 2021 07:23:45 -0700 (PDT) Received: from glens-imac.lan (67.230.181.248.16clouds.com. [67.230.181.248]) by smtp.gmail.com with ESMTPSA id z8sm5654358pjr.57.2021.04.01.07.23.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Apr 2021 07:23:44 -0700 (PDT) Sender: Glen Huang Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Re: How to implement expiration in PostgreSQL? From: Glen Huang In-Reply-To: <975dc23f-3aa4-1a3a-3d20-b14aa0c64668@minerva.info> Date: Thu, 1 Apr 2021 22:23:42 +0800 Cc: "pgsql-general@lists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <84B9E291-6583-48D2-B89D-CF9B971374E8@gmail.com> References: <3AE654F0-815D-461B-B7D8-A137FC1C6493@gmail.com> <4100B661-0C3F-4F1A-BE37-FF00423D3CA2@gmail.com> <9f044a4f-e922-09db-2907-3a34e46a4207@minerva.info> <00D3F5FE-4B45-4CDF-9534-62F3D8C72822@gmail.com> <975dc23f-3aa4-1a3a-3d20-b14aa0c64668@minerva.info> To: Tim Clarke X-Mailer: Apple Mail (2.3445.9.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I'd say that was onerous and you could get the same effect with a well-crafted query that targetted only those that might possibly expire. I wish one cron job could rule them all, but since a person can decide = to join at any time, her expiration (e.g., after 1 hour) can also happen = at any time. So one cron job won=E2=80=99t cut it if a member=E2=80=99s = expiration has to bee accurate.=