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 1wGOid-006B4u-3C for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 22:09:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wGOib-007daZ-1p for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 22:09:49 +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 1wGOib-007daR-0h for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 22:09:49 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wGOiX-00000002dcl-2hCh for pgsql-hackers@postgresql.org; Fri, 24 Apr 2026 22:09:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1777068586; x=1808604586; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=y5s3uB1/lUACL50CwM2x1zfLgUhzsfrN5vYBpaVqWWM=; b=tGjhgMgRrb4xhzqBEkOC1ZxAty3chqcW1h2dqkhv1BQU3a5r/LgTUvPn vMZxecDLXWTno6Ah1vbFB2XUYH8/sCfpZJOGm+M6VsglPqoNd4OS1KNl8 9F+ja69JzfWo5ZX7EgGld0dykUmSzhhvXIYYdzx9a+BUvfDZaV5cn7SE3 SlnVQEe1dHlsnjGTApyTOYcUZBZ71J1xRv9TW9L4WFuvwir/dtHS67iJy xo6u76FBn6lnsc5ZeNtHPSKkNYOPEP8aUYfqLQylpXN73QGdDkoJVGB9b 75G+7oVzyTEY2CRRW86lL+utRgoyim3rJB7KjotP5ajt+yWDnV/+4hM6K A==; X-CSE-ConnectionGUID: ra2B2pi8Q6evorZPy6Tgmw== X-CSE-MsgGUID: MN+P4jumQHGvg+vYqlCXYg== X-IronPort-AV: E=Sophos;i="6.23,197,1770591600"; d="scan'208";a="392071133" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 25 Apr 2026 00:09:43 +0200 Received: from [192.168.178.40] (dynamic-093-133-025-176.93.133.pool.telefonica.de [93.133.25.176]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 9CC0820ADF00; Sat, 25 Apr 2026 00:09:40 +0200 (CEST) Message-ID: <98c1c0d9-7962-4669-90f2-deb28a665a55@uni-muenster.de> Date: Sat, 25 Apr 2026 00:09:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fix bug with accessing to temporary tables of other sessions To: Michael Paquier , Alexander Korotkov Cc: Soumya S Murali , Daniil Davydov <3danissimo@gmail.com>, Tom Lane , Stepan Neretin , PostgreSQL Hackers , Mohamed Ali , Nazneen Jafri , Shawn McCoy References: <402bbc8d-728b-4467-8024-31c2bc101ead@uni-muenster.de> Content-Language: de-DE, en-GB From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Michael, Thanks for the review. On 22/04/2026 01:41, Michael Paquier wrote: > As a whole, we were not really convinced that this is something that > needs any kind of specific fix, especially not something that should > be backpatched. This surprises me a little bit. Until now I was under the impression that fixing it was the consensus here. Just the "how" was being discussed. > After saying all that, there is some value in what you are doing here: > it is true that we lack test coverage in terms of interactions of > temporary objects across multiple sessions, and that we should have > some. TAP is adapted for this purpose, isolation tests could be an > extra one but the schema names make that unpredictible in output. The > patch unfortunately does a poor job in showing what it wants to > change. One thing that I would suggest is to *reverse* the order of > the patches: > - First have a patch that introduces new tests, that shows the > original behavior. This needs to be more complete in terms of command > patterns. The DROP TABLE is one case that we want to keep. This > should be kept as-is, and it is critical to document the reason why we > want to keep things this way (aka autovacuum and orphaned tables, > AFAIK). > - Then implement the second patch that updates the tests introduced in > the first patch, so as one can track *what* has changed, and so as one > does not have to test manually what the original behavior was. Fair point on tests comments and coverage. But before we start with the refactoring, I'd like to make sure I understood your suggestion correctly. You're suggesting: 0001 - TAP tests with improved coverage and comments that pass on current master, documenting the existing behaviour, which means broken commands silently succeed (e.g. SELECT returns 0 rows, no error) 0002 - read_stream.c and bufmgr.c fix + updated test expectations (the same commands now raise errors) Is it what you had in mind? Best, Jim