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 1wJCQg-000AG4-2J for pgsql-hackers@arkaria.postgresql.org; Sat, 02 May 2026 15:38:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wJCPe-001bo8-13 for pgsql-hackers@arkaria.postgresql.org; Sat, 02 May 2026 15:37:50 +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 <3danissimo@gmail.com>) id 1wJCPe-001bo0-07 for pgsql-hackers@lists.postgresql.org; Sat, 02 May 2026 15:37:50 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from <3danissimo@gmail.com>) id 1wJCPa-0000000084b-1yxC for pgsql-hackers@postgresql.org; Sat, 02 May 2026 15:37:48 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-79ea87af213so58657757b3.0 for ; Sat, 02 May 2026 08:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777736265; cv=none; d=google.com; s=arc-20240605; b=W1dvdL9WaxDI9Y7I10U3Hs/bVz1sXNIj7AjmR1qum4Noa9QoCwFDYCyG1LaRGce7pc cjUh5Wn5R1HjVefBI86/M94qMnTIZhcUpSUJcCrFTqaRb+lJfLPLwLsV1xV29tm6Q7Vp GML0MxQhHNdK3rdWSWeu5d1Og6daQIhe7P8n0ruFnz8TAI+tKZZ9mU4W3LJAEKAYEsda uJ32EopCpYqu6dH9+Y0Si8jXcylA7z2xheWB9lJdbrJtMdtzPQBNFVhvlK7v5M6+UPds /XpufAyr3QPiVvHFibcwUZv1DsPlu7GMyPtobZ6O4kAfYk+9lBObLAp+XhJMr5FPvYMR MeqQ== 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=GLpll4MPTW+Y43NZ3LobGsoC+r68I0du0km+BjCj2bM=; fh=UKcFI3gMvOHS+CXCz8yJdNtd7Tl4vvgu3dTI/lQn3DM=; b=dnG/F4ps2AnlHGbNB73386r/6Q/is4o+uMM/rqf5oZBlV2GOg1SmUQhlILzfopnsiK L68AHqLoM0DUc9DFJ8g/+cGOZlCfWaw3Z5YTIpBaC3E8mZu0+iskzqGx51BI6pukOghZ TwKbf+dQBywI4bqVDVgww+IzSCC05ai0BK0XXFKn0E2H0cgimLi5l2GbsSc8j/gdJ3SX WIOgquEntZO6Zt0DNwyDarpW3b/mjcy4HqwyucAPqlVUROOSVPmwNZmoHui6wXvVrszC mkksLBKbmo/qBfWUeVaMMiEMbsr6v+BjLxY/7s0iR2M6xTIu3tsZY2WFaakw04dA08f/ 8A2A==; 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=1777736265; x=1778341065; 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=GLpll4MPTW+Y43NZ3LobGsoC+r68I0du0km+BjCj2bM=; b=MWL8yza0+iPMg8NtwnHYBwE6BcLDb9LVMLsyWdQYYys2Bbw/oxMycsPjLXmaQfSRDf 0vujNuK+opXWUglvpfYWPIur0m7i1XUpp0yhtG2VQsVLZjfraW7ua5Btp/aIczCnXDBv XSjYHPPaeZ8u1W225Zo0tKvl/HIHyu+vYuMyiHEtxKMXcENSFvqbk1YRx74JRHFLMWQL g1gJuMJwdo2Lkior4qSkI+m8vzqTnylgrnTFQkzyAl0A5eO1KSR4PiN5VtSMxAh5Cj5d EJn/6msQO27vXjvVCb5ii+EBn3qJe7NzaeIWVpDzQwu2JfFdV8BKjQe8L0RP7iUfpzHx tv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777736265; x=1778341065; 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=GLpll4MPTW+Y43NZ3LobGsoC+r68I0du0km+BjCj2bM=; b=gM0MP5ki9goGmOTfrdrvaO4r6I5p+E+UyRnWqOrM0vGfmdNdtAoan96TFOBJsV9qYQ jTSC47XWJDRmTt9vwfUlEgiSCo7nMYqEH20BTBYRGFIn8iFb3RSXbZZzw/QYmYyiUNHe j1tEx7xuw83eHQmekgCauqHFT6CRHP2wUEA9iRN1TL18rpks1swB7SI9xRf+LB8dZIyJ 7YIVwRgJVnU5wrmsP12IkTSYMFTnjx8AfhY+PCjAuQb9JEXSD5EvNVo7m06ZkvlTXHvU WYcxEN6n36hmaABYfLr21+cgUGA6GMxPuXrV1HgMNn+Kc+tadFqu0fOSVaPOcba6Qxdu KF8A== X-Forwarded-Encrypted: i=1; AFNElJ/lvatRZa0/t/+zD2dLFLX/7icD2juJIT/dVAaSbzedPF6zOld5z9nf0LMQlq4ENl5WhxiUJUZmcOrarrqQ@postgresql.org X-Gm-Message-State: AOJu0YziAl69QXW7J8+15riG5eWusBwa7tQkG/RjatYKbirT4RF5pN1T er3fLF4D3GCkpwzPutYoTkkG67DmWrE7VtQ3dC3EuDidSWHaan3k8xSurK2NAkZWML9Dti2kymf 0aVbPTnB9kL5DEoAJugnHfhenNfJ5kFw= X-Gm-Gg: AeBDiesZFGEE1Q/GN35qu7eXoqmqR9HFR0Z9B5/N8TMJmMc5jfXJl9YZveggNDw4Szr 3kF+2WxLLeidpc+Nh815t8WlJd5YRSXscfhcgff0C9BCXwaIOTySF5VCzqBrfIuMGxebqNQIj3s 012Tf1F2nwPxNiabmAiC1sp8qwC9ngnxssdljLxF/XYh+/YCuFsHvvt21VI6+9RDNqw3LjcVO3l GDA5jxpfbi4aEoeUd+TCY9zKdUh9hXxzgSdGOPih2q4Uy+Qfs5zVCI6Vf/wBPRSh5S8qtrsK6Zc BuJal+UgnLNF+HXoSQ== X-Received: by 2002:a05:690c:f02:b0:7b6:dada:4017 with SMTP id 00721157ae682-7bd76a865ffmr30003037b3.24.1777736265027; Sat, 02 May 2026 08:37:45 -0700 (PDT) MIME-Version: 1.0 References: <402bbc8d-728b-4467-8024-31c2bc101ead@uni-muenster.de> In-Reply-To: From: Daniil Davydov <3danissimo@gmail.com> Date: Sat, 2 May 2026 22:37:35 +0700 X-Gm-Features: AVHnY4KqJPVmoRsrOsey6RIi-0ckFTvoIzCthhhB11Tqn_TCttHkHp6ff9HLaVc Message-ID: Subject: Re: Fix bug with accessing to temporary tables of other sessions To: Alexander Korotkov Cc: Michael Paquier , Soumya S Murali , Jim Jones , 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 Hi, On Sat, May 2, 2026 at 9:16=E2=80=AFPM Alexander Korotkov wrote: > > Thank you for your feedback. I think the scope of this patch is well > described in [1]. We don't want to restrict the superuser from > something, but our buffer manager just technically can't access the > local buffers of other sessions. Read streams introduced a new code > path for reading relations, which was lacking of the proper check for > local buffers of other sessions. And this patch attempts to fix that. > DROP TABLE is an exclusion. It actually don't need to read contents > of buffers, just drop them. And DropRelationBuffers() have a special > exclusion for this case. So, DROP TABLE appears to be the only > operation that makes sense, it's a conscious exclusion, and there is > no intention to forbid it. Yep, exactly. > I've revised the patch. 0001 contains tests and states the current > behavior. 0002 contains fix and the corresponding changes in the > tests. I made a change in 0001: removed the check in > ReadBufferExtended(). We added the same check to ReadBuffer_common(), > and I don't think it makes sense to do this check twice in the row. Thank you! But I'm afraid that you forgot to attach the patches.. BTW, what do you think about this proposal? : > On the other hand, we have an error message that says "cannot access...",= which > may look like every kind of "access" is forbidden. I bet that this is the= place > that has confused you. More accurate error message would be "cannot acces= s > pages..." or "cannot access content...". I think we can change our error > message in this way. What do you think? We can easily include it in the first patch. -- Best regards, Daniil Davydov