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 1vGfzz-003ygI-Bn for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Nov 2025 16:04:39 +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 1vGfzy-003RAV-A6 for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Nov 2025 16:04:37 +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 1vGfzx-003RAM-Rz for pgsql-hackers@lists.postgresql.org; Wed, 05 Nov 2025 16:04:37 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vGfzu-005bnY-2R for pgsql-hackers@lists.postgresql.org; Wed, 05 Nov 2025 16:04:35 +0000 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-4331b4d5c6eso19033745ab.2 for ; Wed, 05 Nov 2025 08:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20230601.gappssmtp.com; s=20230601; t=1762358674; x=1762963474; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DsWIObsonp+pHNc9Lvd/GpgJpIbaF2dB0pdQ0A1szKA=; b=fBWjVQCBH5s6YQ85mfsiWbkO9t3GFV0gJDG7G9bAY8r3DQQm4UU4atwuEVUJU/sVPZ LpYox9S/fwBuys0L7YMUG2YaBDx/uxss8s6A5Ujf0uOzvoVNFPB58pxAN0fvCeR8vIFV VdsaBA8ICgqw7wikjsilw2jEGoWceG49VuxulL53NDH76TQc+6GL1AFTGn53hCGYn+1b mzZqGNLUJ0uXGVQEu+BtrLuACijMmwTNMdjto+cnrz902ml2c/qbpvzUKzR7gWItxDR2 ZMKhIJ1EVjwg2GKKUl+IncIfyxCJUHSnAsEFlatzz6LDOstVgipzvZYQbkPC0jAxzL2j KYXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762358674; x=1762963474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DsWIObsonp+pHNc9Lvd/GpgJpIbaF2dB0pdQ0A1szKA=; b=BQR3hyPuT6gpafR4ktzJ+pPncmzTgYMTUPEjRwjCIN3mVRS5YN6E4rkah/gWcYev46 pCKLkhjzRtcisVg+wbeRC+cd4oY4UHBEE68l1xEl1nF2EVzylbdfO6YYZ+bEdLEml54/ b01S/oM0NGf4fl3lAHo3Nv/XQ066vO4+eL1/uPGoJ7qUpoYsEcYAPwW8n92j+6Nor8Qq A0xy59yBu+wYeyrUIDL2mGco46ASOl6GOngIoHVjqIb3qAbioVWkxuP8t/3kN2PrHAST hyxkK+wyBXew/hvcW4acuXOgygfC6mnFyMk06lifJReAUnPgfVzOrONQM7Ym4lEpCKYF Hosw== X-Gm-Message-State: AOJu0Ywf8Cq58XO/ouoPv8FYHukWtNd0pJ+xqyphmwlC/OqDHV/mo1MG TBHT5HP+giAI4sHgnepIEIqc/hI2XogHmdbuBtYYeQ1vEIbBFUWMlLxkXWmJoKjdyl1U/79Yz5s lR7ZgqBOlUfNzpOA3JuUu6qj0rJrvDrzOn8kzG8DyCA== X-Gm-Gg: ASbGncuSsWajurvm6MCX+Q5VmOvjiW1yHLXZZv4xd4Wpa/eZqYg1DApJtTW01UDsniK EhZus+IgDsc813vCdSczNAbXwE6EJlOc3IjKH77F/ld6x/9LEaHGgZXS3k6PkUHsyqFxM3ia1T1 Ur1vRz+5EKt0YfNX3DTEycKL9pZBI9ul7FgZOQPZlu/oKM4us2E0XejED8iXDTz1XSDLSB/e0zh gXWBxiCgeRkkJItJUnHgI42AhVb2Tws2a3pFYqp/fpyk/q+iJMOddTZ9Q== X-Google-Smtp-Source: AGHT+IHjpR5AGfiOgcweXSGJlB2yct5DpWCjJEY6aaZ5IT5wMDjEsHXLri0712ZqKEhI+3/jTp3971o0/eahEBVg0jo= X-Received: by 2002:a05:6e02:2384:b0:425:744b:52d3 with SMTP id e9e14a558f8ab-433407af6bbmr52402285ab.11.1762358673682; Wed, 05 Nov 2025 08:04:33 -0800 (PST) MIME-Version: 1.0 References: <2f5364f3-a1d3-4410-98f3-d788b11e6525@eisentraut.org> In-Reply-To: From: Paul A Jungwirth Date: Wed, 5 Nov 2025 08:04:21 -0800 X-Gm-Features: AWmQ_bke8vFmGjJaQ79rDp_lAdOcnA8jfqQaZfP4TE4Agcl4exEmzX5_XQ8MOmU Message-ID: Subject: Re: SQL:2011 Application Time Update & Delete To: Peter Eisentraut Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 4, 2025 at 11:12=E2=80=AFAM Paul A Jungwirth wrote: > Back to Postgres, you can get "desired" results IN READ COMMITTED by > explicitly locking rows (with SELECT FOR UPDATE) just before > updating/deleting them. Since you acquire the lock before the > update/delete starts, there can be no new leftovers created within > that span of history, and the update/delete sees everything that is > there. I forgot to mention: possibly we'll want to use this approach for {CASCADE,SET {NULL,DEFAULT}} foreign keys (if the transaction is READ COMMITTED). I'll explore that more and add it to the patch in this series if it seems necessary. Also I didn't consider whether the regular DML's lock could be weaker, like just KEY SHARE. Yours, --=20 Paul ~{:-) pj@illuminatedcomputing.com