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 1vVuLB-009cGy-2D for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 16:25:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVuL9-00ETaq-2a for pgsql-general@arkaria.postgresql.org; Wed, 17 Dec 2025 16:25:28 +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 1vVuL9-00ETai-1N for pgsql-general@lists.postgresql.org; Wed, 17 Dec 2025 16:25:28 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVuL7-001B36-3C for pgsql-general@postgresql.org; Wed, 17 Dec 2025 16:25:26 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-477b198f4bcso48242885e9.3 for ; Wed, 17 Dec 2025 08:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leisi.net; s=google; t=1765988723; x=1766593523; 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=8PewY3CeUFhvSIAK56ajAJMK29w8pDzSTVdZ0hTxzWY=; b=jCw9bAxKus9nO1sAP71wCHCMNOnrf6EjCnUMRyJCeYXyuPjdn1OTkoAvH76MtPp50K 5WNBtcMZ/Fes2cz8hBMN5jacJRMETwV436GNIppT+UMXLRxUWVlpoB2QLCqWLi4/CpY+ DPLaJtW5GnVVM1OR7L8+g0UMkM/VCgyS+1k2M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765988723; x=1766593523; 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=8PewY3CeUFhvSIAK56ajAJMK29w8pDzSTVdZ0hTxzWY=; b=oHSlZZL41jikH1AJ6KJWmy5ZiCkP0b49THFhhdv/cYcl8LWbjaTjptXnoRh3XLsjdf XllA0KBAqql8jnSzR8hNaiODDzA5inoLgc4IQt2oKwzAECITs/RRzLItxj8glUiuQMBT Ed90RSLL2JDO05oAq07Enjj7HbehAO4I2xn0ie+X0fbjTpSkUi3cRiVi4hBIiM/urqle ftRGzavNg3vvMgvtrGDCdeBi5HdSm2dIma4TlAyJeGbdvBD1mhjt2EiebiyeLIyxG3xi 4GxL1xfuxMCU5l+higxa+3Rj9ZD9/fEgWk83xTox/EnkeKHTOtpdyoUYE+YrcePanGWb lYKA== X-Gm-Message-State: AOJu0YzndVOK1zpAw0JHScycTHTMnFTibAVCCP778yCAsqmuOTyqdKhV fbfkLjrBdouj9XGRRWt6tifcc/IClhLigCJGTZy8kN/qW7QyxLpr1h2pd/JXLODmM+eyL8+PE91 rsj9XxQ== X-Gm-Gg: AY/fxX4r5WCGzeCB/CcRRGsMaKTbKmfcHDl4J5HUfKizX6XHdODYyBnzgcoC07j+b6w COaIO+MTm7i6jZisw413pFs3ddzexP22KeCVvhDVj5LQw+d5xxxcapEztBFvpza4eFxheHdj/4d PU16PqIciq99lK3m7k+TbEZ1D7bOcdUOh54oi/+AJN3J7RfxeWZfwB2MxhsVbQyAeXTu5ZCT2Qc lkW1XzPGw9WO9wn9na4sMyf9JRdAYFjhARYpCxSmF034LdWo5IAChpI88sSNy6EzkpplGyV2Rf5 uBVzYieIbDCanAZ//RGJHzNNAmk+kBdzaKeZfKP3UViRADcJBrrMsH/9R7qbHw3pLoc0V/D4sC1 yeK0EXRp90YGt5WZQ0hifj4N2wtIkMtkYRzJZ54m2fyS8On1oR4QAKRAElZhtSuLXBw8gBE2fgd CumF4a24aLoZEL8jjEpIwnHfR6Qii6izhAJL5OLkOYSkgqhH0= X-Google-Smtp-Source: AGHT+IG0yPLee+i6p/0Cdw2DQF5FFDT/vqGcG18U90ReHUjRFIVO/8diOXDIVeMllUmdJpxf/pCETw== X-Received: by 2002:a05:600c:5252:b0:477:76cb:4812 with SMTP id 5b1f17b1804b1-47a8f708ebamr187037215e9.0.1765988722728; Wed, 17 Dec 2025 08:25:22 -0800 (PST) Received: from smtpclient.apple ([2a02:169:ce0e:0:7471:8ef8:5c1b:6b9a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be2729759sm1457605e9.4.2025.12.17.08.25.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2025 08:25:21 -0800 (PST) From: Matthias Leisi Content-Type: multipart/alternative; boundary="Apple-Mail=_4AB69AE3-64D9-4ED0-8508-4AD13118C054" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.200.81.1.6\)) Subject: Re: Record last SELECT on a row? Date: Wed, 17 Dec 2025 17:25:10 +0100 References: <287E4DF6-35A2-4062-AEBA-32DB1DE35C5D@leisi.net> To: pgsql-general In-Reply-To: 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=_4AB69AE3-64D9-4ED0-8508-4AD13118C054 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > pgaudit might satisfy your needs, since it would only log SELECT = statements on that one table. You'd still have to grep the log file, so = the information wouldn't be real-time, but that's probably not = important. That=E2=80=99s a viable suggestion, thanks a lot. Real-time is indeed = not necessary, a daily (or even a weekly) cleaning of unused data is = sufficient. pgaudit was anyway on the table for some other use cases, so = that would fit in nicely. Thanks, =E2=80=94 Matthias --Apple-Mail=_4AB69AE3-64D9-4ED0-8508-4AD13118C054 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

pgaudit might satisfy your needs, since it = would only log SELECT statements on that one table.  You'd still = have to grep the log file, so the information wouldn't be real-time, but = that's probably not = important.

That=E2=80=99= s a viable suggestion, thanks a lot. Real-time is indeed not necessary, = a daily (or even a weekly) cleaning of unused data is sufficient. = pgaudit was anyway on the table for some other use cases, so that would = fit in nicely.

Thanks,
=E2=80=94 = Matthias

= --Apple-Mail=_4AB69AE3-64D9-4ED0-8508-4AD13118C054--