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 1wLErv-001e2Y-04 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 06:39:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wLErt-008KuV-2q for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 06:39:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wLErt-008KuN-1x for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2026 06:39:25 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wLErr-00000001A4p-1def for pgsql-hackers@postgresql.org; Fri, 08 May 2026 06:39:25 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-6948da50eb5so894410eaf.1 for ; Thu, 07 May 2026 23:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778222361; cv=none; d=google.com; s=arc-20240605; b=N5U4tRUdMrJ+qc6xl73uUhiEEbFw5SNhIQmfpHiDcU8/X72MnU+BLLRnl6tVK49PAL KtAzbV89wxj0gdjJ4qRgXYV4vwYhtFBfSfSU0fPZxDyp3p9amukfLxiXUlUvsm7NouRf LdiRzR6u3j0xw9c8HjbmY1cArFBCyPqYfOcHXBu4BRrBkBl+V+91PLl3YVchuvFOQ9Fd 8O6axXKLhxinO3VlgH1Lkxqimh392xmK2LxRu5KCt9v6EeA3n2Opt01Jh79DdnuEMO0h a5/8r4tCtp7mIh8Eg9XFZH2pSs8cYhdyvl15rzLGbgaKpDXxJCIIF6yDNCSbGInNgPRr b3DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hd2aGRS5A2v7M5W3T+oDlWODLKsMzvNZVZt7mf2K8ss=; fh=cXKQJw39Q8Z2kX7xGwTu0gvtqPqHr80dBT62bbMDzOs=; b=aRGq2AMQHuWPgoG0NmDNdLVBMbyWs6rJxRD2u+ZwDGqGbk+t4guGQ5NhGIJzP8+Xgx IsuKS1knsMZsWYPvxNpMZwFqgTXPbWgceGCtKi9ZnIFnNDlP54vTz2VODclFXmyp6tYl auOFRqa2FTYbeCoPTRWyWdGgDiedgqUderR4ahY/yhuGrdyp4M+hTqIUro4NhFxaNAmk qXTEAmXHI1jc8DQuJPcyYr37yLbRJots0k4wDJrfudMc1XmBa6gvNgmEbP0t0uOr9m3+ OQPH3YItdDRw0IMj8y+L/JYp7QiVAweNJV6G5Xpp5d0QM4G867YxSbTJWfvkLBiOd/8O 8PrQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778222361; x=1778827161; darn=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=hd2aGRS5A2v7M5W3T+oDlWODLKsMzvNZVZt7mf2K8ss=; b=cfU50foJFVTdskzYWcTobmBGptB3DkozN5Y/tqtly9Ms1OPYEnszlTryfo0ygKwufa R+grfoo69LqHs9kOjfmuWdTXBb8apnijUfIU6Vp1H7NMZR8d1FK4RdIAaEFUIkaWIIZX qay10Q3kk5o1p/fqfmF2vsDS7w8asgvgXWOmTTUZbHnkp+mfoIWd1Z+vpJKhfvTfBIQJ guEXvAyRxdfmrbvKvyC8DqBsgHLgoC59MzRS6ZnDSA84byM9F9PebXOHWVsLhvPY5pqN tSl7hfIYadWc1w/o0kQvdjJgfFb+wENKLNIxFDJ+SGPCX9pU4rD6LJuACzVEGB/4jxlj 11Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778222361; x=1778827161; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hd2aGRS5A2v7M5W3T+oDlWODLKsMzvNZVZt7mf2K8ss=; b=CN/M7mh3GqY+us6zXBwusFgkL/RUGRXo8n4WD6pxNpTxbuIPJL3PB7kDIc52BAdlCS 2HDkhRU00vyLFUyFatBTIB1U4LJDuy1yN0x6zVtCtmYlNXXNGiZli5JgOO383zEGMuBA Z2V5UXLowLdMSbB2kwoe7oNQ7rmwkBxAAsWuoByuTfbhFTlIfk5kMvOrfCDNKko5N1LK fQ+SgOHIDAiagPx+MSmscwQoAdBrTFZNBtWDw0PSWFI3Nw3qH/PC+Wgl+WgqmvObP0SI IFdNtQ18W2Rj0UoZpI7T8frVPQbPaARhyAxkL12Wf7d260xLXkEWN65NwF1TRyM2U1G5 +2bA== X-Forwarded-Encrypted: i=1; AFNElJ9YhmIDKLYpUT1V3nNrc7WO2CS59yk7XRCg+0TT0H/YwwuyfuVcYpL2tz7kzriARnta7VzLY+/YsEYC42XV@postgresql.org X-Gm-Message-State: AOJu0YxzaWsSlJ2hXXVCkZOprMwtZABkECJFbNgQHMeiUIrQY9jU57z4 SGaAqO3gf54MSrzFmFCCLuBQmuq3Ci+NqeujIOvaM/Zznr7CJGTLM4X5NsH8083wWvTSLI+bqrw owsneIwqFb4Xmh3xIamiVWy4Zawznock= X-Gm-Gg: AeBDievnAdUt8WKlh+CxzLyhhycCl1sHNQxckEx4cu0hdl86oP3LmtnlkSJBMKIvXUS 8kItwbVua20NnJCv8B04RcIuk8E/mUR9XHEF5QqdHmW1kh3gcT3fUd3WaF3Ct9bUPY2iGyRXdt5 B2WAoftVW13L0XiIBtv8VvV1UNBv+N06GI1+JjNpt1zOzsO6pXk4dk+AlSPh7mFJOtIxrgUagJI af+GCSkFun0CEwAT4Y7gz7eR3zvys12jQXBTU9v3KkLPcLhPL5IYYbNLvH53b/65Qtli0wbMIgv 0yBvhsPWOU6jteq06/26sBVJmdAilRoTrtBKCSHcULPQk7OGCSeZ7TqXk2ZjTaiPKmE/8ipS10l 10FHHQJmCobnEmX+GmGGdmu5YMeRi4WKLtsB3nS2v X-Received: by 2002:a4a:d18f:0:b0:683:a6e:970a with SMTP id 006d021491bc7-699ab699393mr2436096eaf.40.1778222361245; Thu, 07 May 2026 23:39:21 -0700 (PDT) MIME-Version: 1.0 References: <239d181d-1415-49ee-ad57-b307f1a7ba66@uni-muenster.de> <0e666e40-d003-4c92-95cf-1a33a647401f@uni-muenster.de> In-Reply-To: From: Alexander Korotkov Date: Fri, 8 May 2026 09:39:09 +0300 X-Gm-Features: AVHnY4KD-cUr3EUVA5VHXOy6JeSfphsF0CdpdCR-PUYfaMZumEU6J51Scz_it2Q Message-ID: Subject: Re: Fix bug with accessing to temporary tables of other sessions To: Michael Paquier Cc: Daniil Davydov <3danissimo@gmail.com>, Jim Jones , Soumya S Murali , Tom Lane , Stepan Neretin , PostgreSQL Hackers , Mohamed Ali , Nazneen Jafri , Shawn McCoy 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 Fri, May 8, 2026 at 9:19=E2=80=AFAM Michael Paquier wrote: > On Thu, May 07, 2026 at 11:04:16AM +0300, Alexander Korotkov wrote: > > Let me do a quick summary: > > * Our buffer manager is not capable for reading temp tables of other s= essions. > > * This was covered by explicit checks, but broken since b7b0f3f27241 > > introduced alternative code path for reading tables. > > * This doesn't apply to DROP TABLE. DROP TABLE is a conscious > > exclusion and the only operation we can do correctly for other > > session' temp tables. There is an explicit exclusion in the code to > > skip the attempt to cleanup buffers of other session' temp tables. > > * This patchset consists of tests (0001) for various operations with > > other session's temp tables including buggy behavior, and the fix > > (0002) including changes for tests. > > > > Thus, I don't see the reason why this shouldn't be committed and > > backpatched to PG17 (first release containing b7b0f3f27241). > > Opinions? Michael? > > Hmm. I don't have any counter-arguments against a backpatch based on > your argument related to b7b0f3f27241. Thanks for reorganizing the > patch set so as the tests happen first, and the changes in the code > become second. > > If you wish me to look at this patch set in details, I may be able to > do so around the beginning of next week. I'm not sure that there is a > strong urgency in tackling this issue for this minor release, this > could wait a bit more.. Absolutely, no urgency to include it into this minor release as I already agreed [1]. You're very welcome if you could take a look in the beginning of the next week. Links. 1. https://www.postgresql.org/message-id/CAPpHfdsEr6RF-SkzVGD6PzFusENbpNPxK= nRY7iQQ%3DcZQYJia6w%40mail.gmail.com ------ Regards, Alexander Korotkov Supabase