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 1lRyRZ-00068Z-6k for pgsql-general@arkaria.postgresql.org; Thu, 01 Apr 2021 14:37:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRyRY-00078L-0H for pgsql-general@arkaria.postgresql.org; Thu, 01 Apr 2021 14:37:08 +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 1lRyRX-00078D-DT for pgsql-general@lists.postgresql.org; Thu, 01 Apr 2021 14:37:07 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lRyRQ-0002c9-Mq for pgsql-general@lists.postgresql.org; Thu, 01 Apr 2021 14:37:06 +0000 Received: by mail-pl1-x62e.google.com with SMTP id t20so1100760plr.13 for ; Thu, 01 Apr 2021 07:37:00 -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=4RG/GAGRqNLZKC0k4Zh9VxzHu3vY3313gYD7K7Ppk28=; b=MduG/eScnioh6G1KtcEzj+DvAidNc56qPvqXVo990+Rh+ZXyRcEuMfbGAXoWEjYby/ Lk9wDP/NTbPIsDb6z9zmBXZsWooLNL+E9UQusQFmAP6M6RuDLV5N6xI1PJiOOZMW14Jq rr3McR6sFduwRoDd0nmHJSU9KZjw0AYNFpmqdPcqbSvUCmOl/4QLZRW58bcdA+TW2pqy Edb/Pp0A02P9RGEnj+G7Yn4k0AZ0hpGuVJFmEOI5mlj91zPvqGWi9jTopsI9+zUlr1cq N3FcmjlElnu0x/Mv47I8ec10Yn5FCL0FJnvIQ/u0hQedSzrZ926A6kSpxtXHcNYC44wF A8pQ== 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=4RG/GAGRqNLZKC0k4Zh9VxzHu3vY3313gYD7K7Ppk28=; b=Nywg/SKsLCtgF6g42Bo4yOV3AksCSdQ9TWd9Cbp/CB+zzku4nT7sCQfasGYrHrQP+0 /hLVPDe9yyYoKoIpd9uWpNEiD5B+6EIl/fcF8HChc9u5nFPcvxYARoubSG0vVfAujZ9K A1V5Ygo4PbR0+YXFK1RScQHPZ7wgwlW/jfG8bUJou77ufexNUhDiaH92ykWZajGp1qnJ YTWFjVTYxnjC6OwLUIER4sdAt5e/7nqHWOCy9/v6CWRGJP2aor7PLKRul9Jknstztzi3 TQ3H98BHIZaQAxdAVzQsjoR86aUEMXlkN93vMBT2RlhrHqxtMcI+3PWgAlvQQAExmrpi qG5w== X-Gm-Message-State: AOAM532XCMp69BrNBwXUpIo7PE6b01Jje1G86cuJc1YpSVuA9pW5Xqov LMSN+0EArjSLvRmQZx3n6I0= X-Google-Smtp-Source: ABdhPJy9wGLPvzWP2GXux7pfmNEqRbwMaQ82fsZda7ObKCt5Omeq4givCVGMoCen5hk4/ey0QBbbJg== X-Received: by 2002:a17:90a:7e4:: with SMTP id m91mr8764810pjm.46.1617287819541; Thu, 01 Apr 2021 07:36:59 -0700 (PDT) Received: from glens-imac.lan (67.230.181.248.16clouds.com. [67.230.181.248]) by smtp.gmail.com with ESMTPSA id x19sm5719010pfc.152.2021.04.01.07.36.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Apr 2021 07:36:58 -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: Date: Thu, 1 Apr 2021 22:36:56 +0800 Cc: "pgsql-general@lists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <22580D26-89EE-466D-8F4E-7FC96CB95B89@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> <84B9E291-6583-48D2-B89D-CF9B971374E8@gmail.com> 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 Hmm, maybe letting people linger on for a couple more minutes isn=E2=80=99= t unacceptable. And it simplifies the code a lot. Good idea, thanks. > On Apr 1, 2021, at 10:31 PM, Tim Clarke = wrote: >=20 >=20 > On 01/04/2021 15:23, Glen Huang wrote: >> 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. >=20 >=20 > One cron job running every 5 minutes should do? >=20 >=20 > Tim Clarke MBCS > IT Director > Direct: +44 (0)1376 504510 | Mobile: +44 (0)7887 563420 >=20 >=20 > Telephone: Witham: +44(0)1376 503500 | London: +44 (0)20 3009 0853 | = Frankfurt: +49 (0)69 7191 6000 | Hong Kong: +852 5803 1687 | Toronto: +1 = 647 503 2848 > Web: https://www.manifest.co.uk/ >=20 >=20 >=20 > Minerva Analytics Ltd - A Solactive Company > 9 Freebournes Court | Newland Street | Witham | Essex | CM8 2BL | = United Kingdom >=20 > ________________________________ >=20 > Copyright: This e-mail may contain confidential or legally privileged = information. If you are not the named addressee you must not use or = disclose such information, instead please report it to = admin@minerva.info > Legal: Minerva Analytics is the trading name of: Minerva Analytics = Ltd: Registered in England Number 11260966 & The Manifest Voting Agency = Ltd: Registered in England Number 2920820 Registered Office at above = address. Please Click Here https://www.manifest.co.uk/legal/ for further = information.