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 1wLEYr-001dpK-1G for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 06:19:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wLEYq-008FOw-03 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2026 06:19:44 +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 1wLEYp-008FOn-2J for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2026 06:19:43 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wLEYn-00000000lJC-0A9j for pgsql-hackers@postgresql.org; Fri, 08 May 2026 06:19:42 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 82E8C7A0126; Fri, 8 May 2026 02:19:39 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 08 May 2026 02:19:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1778221179; x=1778307579; bh=dy/Q2PGVZ4 MivzVFDMzAb+LjLb3E1uBDB5XJxNQ5uUI=; b=HnDrM4Rv/JcuPNIetvRJpvmKpJ B4zJ+aE5Trnv0cb+nxutRE11eYzf1KsiTSkuVx1HikSz+WPzM29gWQkegqDr/68g 0eoE6gQ2JqP1wGU/ISyGCM0JAJk/9EdRjW6YmuUn9ZShwVhlRw9ZpnbW+rDgd0DX drt9R5URZnBMszNYx1Rtn/QtYogtSqwkZGVxVL3rD58qrTHnB4M5Sa7S7mbr1XjD 4Ktkg04e4WU5m3op/HdOBKiJUHXQ8znikBmp7b9PyWMVCH7zkYueSwl87AtJu7sl ecuJRt51IXlajosVdo4wGMZFU+AoLIb8Vbzu8jvMXhaoKv2+d+as+oRtDLxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1778221179; x=1778307579; bh=dy/Q2PGVZ4MivzVFDMzAb+LjLb3E1uBDB5X JxNQ5uUI=; b=r8NB+cRonSSzHgdk0I+72vZdcsIPisty65feSXYwtJwD+MYbYue hMDqgHZR/PIvL1CNI3TheDJXrfTuTU+5it6oaKGAFWN3H6olbDObqPoBAXWrFEvH sabID6B9xtrmr+XcsGekEykAQOLWSKCdK7U3mOKKHRfSN1n0ipHNKZ2BWydqXKaU Sjza8EQkC14yL0eym9x4ZzEWTqGbh0q9MAmqsYwiUzEhPPhpt2zBjnB+RSdyN9iY TryuAFBqQMvb0IwkujXtidppzuOqxxZLikZCwXOrPu6vb6mZqs+PMc7jVhp5D7j3 69Fm79Vlq71phvZoCuwkbdxjAPD5kAFpycg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddutdelieduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenuceurggutfgvphhuthdqgfhmrghilhculddutdejmdenuc fjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgr vghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecugg ftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedu tefggeeivdejnecuuegrugftvghpuhhtgfhmrghilhepmhhitghhrggvlhesphgrqhhuih gvrhdrgiihiienucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhnsggprhgtphhtthhopedutd dpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprggvkhhorhhothhkohhvsehgmhgr ihhlrdgtohhmpdhrtghpthhtohepfegurghnihhsshhimhhosehgmhgrihhlrdgtohhmpd hrtghpthhtohepjhhimhdrjhhonhgvshesuhhnihdqmhhuvghnshhtvghrrdguvgdprhgt phhtthhopehsohhumhihrghmuhhrrghlihdrfihorhhksehgmhgrihhlrdgtohhmpdhrtg hpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopehslhhpmhgt fhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpoh hsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehmohgrlhhirdhpghesghhmrghilhdr tghomhdprhgtphhtthhopehjrghfrhhinhgriihnvggvnhesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 May 2026 02:19:36 -0400 (EDT) Date: Fri, 8 May 2026 15:19:32 +0900 From: Michael Paquier To: Alexander Korotkov Cc: Daniil Davydov <3danissimo@gmail.com>, Jim Jones , Soumya S Murali , Tom Lane , Stepan Neretin , PostgreSQL Hackers , Mohamed Ali , Nazneen Jafri , Shawn McCoy Subject: Re: Fix bug with accessing to temporary tables of other sessions Message-ID: References: <239d181d-1415-49ee-ad57-b307f1a7ba66@uni-muenster.de> <0e666e40-d003-4c92-95cf-1a33a647401f@uni-muenster.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xl2+NZOCg1SMpevU" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xl2+NZOCg1SMpevU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ses= sions. > * 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. >=20 > 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.. -- Michael --xl2+NZOCg1SMpevU Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmn9gHQACgkQnvQgOdby QH1aCxAAjyykHKtWPHuXxCjjXans33yPgyDM7LGOy+5ITbYv9/QqnXgyu0A+kpkr AdpZTkt2XX7fDDSP8xRMNyyHo53eozRarptz4MmETtXVVqBS+g1mUmpMMm3yqylK pebsKNeCACKiabKya2VszJvHJCGUHmyAMQL03I9ZbyDo9TPf3aTPiEq9K8zkyPgT GCLLDZ2OW2gFQbdoSvQR2+rwvDhmykDSpvZ3y/I9859xzAGGDZKK8lUd+QcpYjT5 3/S7/kjRROhJTLxE41Wsi/6Q+KG8kdqrje/0GFIFlzjJQqufnu9xBs0jeKVeSx7D MbcVtC1NAaRr/LK7YUgJ6rJ/GF21HTemADvzBZ1H5cqaqoFe9EMi1TpgkiTKrTVQ nsadi2HitQm6qh1YPTmdWLgvkD92xAl5eEr1B8D89lGDYzP5nCM2V21gAtKQkI1G y3ukYaWnlM+38A9accVXsGbubCOPkyT5cKi0EDUPv06BukVKyAJKVPGLSXt776c2 bgTuXUntxhYh807VknR1w43yWKO3I8PMNH7jmuLXDk0vf32LxCiR67h/aiBXlEP1 hvB63M84WmkbO6pl9csSLbvjrP9XH12EHR+3HbiOzsLUiFtmIvPHMTvzZ2pOGjNF G6zTNxVyPqgCR4SYlJM8lwIvrNfJdHZm9inYgmda2M8M+UGyOg0= =cnsS -----END PGP SIGNATURE----- --xl2+NZOCg1SMpevU--