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.96) (envelope-from ) id 1vW8GR-00Dma7-03 for pgsql-general@arkaria.postgresql.org; Thu, 18 Dec 2025 07:17:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vW8GP-000gTM-07 for pgsql-general@arkaria.postgresql.org; Thu, 18 Dec 2025 07:17:29 +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.96) (envelope-from ) id 1vW8GO-000gTD-1e for pgsql-general@lists.postgresql.org; Thu, 18 Dec 2025 07:17:29 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vW8GM-001HkF-32 for pgsql-general@postgresql.org; Thu, 18 Dec 2025 07:17:28 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-42b3c5defb2so147422f8f.2 for ; Wed, 17 Dec 2025 23:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leisi.net; s=google; t=1766042244; x=1766647044; darn=postgresql.org; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :from:to:cc:subject:date:message-id:reply-to; bh=0D7nash/P9ciifDsFPmpTYrKfqbfl7NG7L3jO0UVA4g=; b=eEvu0HTXMH+zD4Xph68aBOAW7aC1kSdsc+Ib0xNz1WP38AEIQtqAXEn+BqypBMCXV7 GfBKKEobdgnJrdJ8zTq6wYkKOKM42PGjcMcuvAdc3cQCkh7BM3TNoxKtFAnE+mveqa1Z bcOWjJcpCSfk+OniEdBIp0LOgP3IrvQ3mzu54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766042244; x=1766647044; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0D7nash/P9ciifDsFPmpTYrKfqbfl7NG7L3jO0UVA4g=; b=VCMx5Cv98/4m++QdJu3uwPCt8+pfm/zKl0p3jVXxLzgRBIJdpYsPT8uOv+aD0w3r6A P0HE1b29QhREYY/REkaiDRXn4/6mcJQADm6a5zcAtDteQ/nBUKv9XPTc0iG8BUyGw1K7 050wpza2IWT9Vg2dhOd3KXe1HfZY7wsTnXP3S0X3kDkZsArvbX1ujpIoyEU9ioj1R3KO mejEpNKWwb1BbKZKrjGaW8DG2MtqOIDlw15vVbL/SE4cmLnWDGP2RH21f2QPvko1cn9y TRl64tZlPZORYi2gYXKzKg0tWcN9xmDGO97Q6Drh+xTR3REXe5Ga5/hyKvWDXKwqMdqF mtDA== X-Gm-Message-State: AOJu0YxUbqvP/VJPSUrJi5JLGHJZ334CuMLuKu+xsXE/aY0G5EzS8/ag H2lHuSlEYPc4gXT6b3NeGXYWP8e4XopvU0uW5Jw5fNvOI8904CCSUtYp/P0/lGkywFiEYnX2kNY H5SQR6Q== X-Gm-Gg: AY/fxX55nOVxi9r6vQsPZFQdAbOHKSb0SOOm4XqQ+tLnpaYbuUb9g64gKE/8qN7TbQP VfYYK7pndNSeOIx7td2wRr3CtO6jaA8+nJM68sDpFLa3vTFnkqVInB1y2v1gXnnQNFKPWynbm0L aDqJe93OG0EQYj4Cl3jB1WN4j/QXs4dKsoYmdLJKx8/623hlpDGxF49Xw/KFXQOtk2nDDWPHwxO soQB3534hmn9GZFCAhnHVD5QFkQ5IORXMjx79C5UOdi6I0URwdsjs8Wk7XJ0KOU+K5oYOM5bkQc Fjp773/IUFcWP/UsbbouItxxvwVnGjdX20m5fZKbDJ2Fg5H2IImCGnMsdcNNPlUYnP3zhfj3k/u M6VX5qQysQwHUwnEwvth/hNJtNdLXZTAJFy2FHSHHulCzK8gqIcbQFwzFVgjc4o03ie4IM1OHup wPiFl0VBWhuVtBcPhvAFYCrt6cWM30Szd231XO X-Google-Smtp-Source: AGHT+IHvoOiA9w1+bSeHYarr8afMG4n6IZ2HgUCA4EPcAONYU91CCBBgzUFdU39YwSCtSNzfFS1oEw== X-Received: by 2002:adf:fdce:0:b0:42f:bc61:d1c2 with SMTP id ffacd0b85a97d-42fbc61d412mr13979918f8f.34.1766042244182; Wed, 17 Dec 2025 23:17:24 -0800 (PST) Received: from smtpclient.apple ([2a02:169:ce0e:0:3c92:c6b9:bcaa:ede8]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432449af076sm3222903f8f.40.2025.12.17.23.17.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2025 23:17:23 -0800 (PST) From: Matthias Leisi Content-Type: multipart/alternative; boundary="Apple-Mail=_59CF4A71-F02A-4859-9B3D-0E74209824CB" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.200.81.1.6\)) Subject: Re: Record last SELECT on a row? Date: Thu, 18 Dec 2025 08:17:12 +0100 References: <287E4DF6-35A2-4062-AEBA-32DB1DE35C5D@leisi.net> <91687275-3826-49fc-b705-70ab2b6e0bcf@joeconway.com> <2654835.1765996654@sss.pgh.pa.us> <4edde38e-8d0d-4b66-993d-e38dca3bf2cb@joeconway.com> To: pgsql-general In-Reply-To: <4edde38e-8d0d-4b66-993d-e38dca3bf2cb@joeconway.com> Message-Id: X-Mailer: Apple Mail (2.3864.200.81.1.6) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_59CF4A71-F02A-4859-9B3D-0E74209824CB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >> If the application's behavior is simple and well-defined, this might >> be good enough, of course. >=20 >=20 > FWIW when I read the original email in the thread I got the impression = that the application behavior was pretty simple WRT this table. But of = course I could easily be wrong... You are not wrong. The use case is in fact the `userpref` table used by = Spamassassin. Left unmaintained, and given a large-enough user base, = this has the tendency to grow considerably over time, so we want to = gradually remove entries not actually used any more. (And we don=E2=80=99t= want to patch Spamassassin core code to do this by itself=E2=80=A6) I=E2=80=99ll give it a try with ab/using RLS, which we use for some = other use cases anyway already. Thanks a lot for the suggestions in the thread, much appreciated! =E2=80=94 Matthias --Apple-Mail=_59CF4A71-F02A-4859-9B3D-0E74209824CB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

If the application's behavior is simple and = well-defined, this might
be good enough, of = course.


FWIW = when I read the original email in the thread I got the impression that = the application behavior was pretty simple WRT this table. But of course = I could easily be wrong...

You are not = wrong. The use case is in fact the `userpref` table used by = Spamassassin. Left unmaintained, and given a large-enough user base, = this has the tendency to grow considerably over time, so we want to = gradually remove entries not actually used any more. (And we don=E2=80=99t= want to patch Spamassassin core code to do this by = itself=E2=80=A6)

I=E2=80=99ll give it a try = with ab/using RLS, which we use for some other use cases anyway = already.

Thanks a lot for the suggestions in = the thread, much appreciated!

=E2=80=94 = Matthias


= --Apple-Mail=_59CF4A71-F02A-4859-9B3D-0E74209824CB--