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 1wVHvD-001qqX-35 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 23:56:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wVHvB-009NWJ-2j for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 23:56:21 +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 1wVHvB-009NWB-1m for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 23:56:21 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wVHv8-00000001KEC-2H8Y for pgsql-hackers@postgresql.org; Thu, 04 Jun 2026 23:56:20 +0000 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-8ccef25789fso8582166d6.3 for ; Thu, 04 Jun 2026 16:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780617376; cv=none; d=google.com; s=arc-20240605; b=Rv8BseFpd7WhmavZ/WvCi+AcK0ndjfisyyXDE/3tkFXlrZR+C3GCiBo6DTRh1uyEDu yoCJj44O5Sb3TIt/+V6L6DIPJ4mWSbIMihBB16OvPSwQDqchOrI7AKwMko325mdzfTuJ mZS7EOB1AHYPL/vlFCosKAR0K25tIzZiEdoNhguvkqDjmBEnt/7jC7+pXK4qrhSivxax on+N5FBrBJSbLp1iJvDnHx/EwLv86w6UorErFaHcHGxvBwI0QCxMyW90K+PQOYHUB/qt wbIzMDamKkO5MeXLDhBE/LHq1pkKOQD+wwuhnoipSh8JdDVAIIjvA+lgb4MZsIgSn6MK rucQ== 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=7NFQDxbC+L28PGO6EooZLXAwpLIl4ssIw0sAxaro9fE=; fh=6s7nufWqqSnzPNGEVFhR2lIHygNraJuG711/136qgWE=; b=GIn5BvR1lPEsUgXp1mDL9GJj9M1Ir9NiJoAf0psTL8S+nTDPPdCvmalsqaKH0M/PZA 0Vkf0Zjk0vYJ69DtNenE4xPk6mgxUvRWM/PzA7AMGXTLP4vGGNb4iPM8uWOAAFTMfq/W vf/3Bwrv/HCrmMI/TBKSdbjFZ16WkzuySevrUzhPSvCUW6CBRDZhGZwoNRuAIWi3V/sh 852rhrkANx2fzQ9STlmJ06be8eCglyIU9hvgBYONV+e5gooqNsXjeAfVtI4ArsAUKwGY nMWjyrLcFJADFU+WminKlh6BK6G3iCc2qgb0xeMOfCQcBoNAZLK5oPmPNJ7J4hppOr3s oIhA==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1780617376; x=1781222176; 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=7NFQDxbC+L28PGO6EooZLXAwpLIl4ssIw0sAxaro9fE=; b=JACDNuCZEK2ptn7/+eHT0gpIGcXzZaa/LYTSYet8XVrlb3W0CKUtQljqEyqkLFd3Kw n6SLNqOqfAbx9y1Ntrlt/yT0+F2/Z6Zn+6uNidKjDj+GWD/pChASXVacs7BElsyiPeIu wjzihs6CgTDOVWwKfQe5gTBgsIBwDwpqI2gBEe8uOJNJug8NPjrv+tlwiPFzdADtQytS oBRN2Fa1nwPqV7o0sNxCocRucSZ3B7eYCpoE0hxReLjdz/j6JtgMgNvNjxaizSIv9L0R RVCIkIlhDFRazB8XkID51ZU+B5UBNGehaMhqVYqrb6FHU3lAXhHhdG3b/pBDnG3K2v0v bGYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780617376; x=1781222176; 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=7NFQDxbC+L28PGO6EooZLXAwpLIl4ssIw0sAxaro9fE=; b=YWDyvpDmBCC/d1+L2ZcHQKiKlpZI68bil66iU9mKazqNnbY0DmmEQxWo2gFWwQ938b sAb25kfnyr9denRrdDigDb2F2GHakPuiORv6S1pl857rZ62mV9ir80mqxFyPA6OcTj5S 7Un/EthPhsQmVmAGCaMnPGBJZ5jw8r+uEDrF0eJq+VmxtC9fMsHDKo19UmH04yVGh8jt cHOuxB/x4A2cIOctH9jYLQfmtjWYwGN0wA3h6OAu1Wl4GP50N+zuLru+7j+HH4g7gOQB SY8FLJnmQr4dsdPcUGMvrVcNjazptzBak3bu4mTNUKSS8zFvjjMrpaye/uSx4jhtb+be /gOA== X-Forwarded-Encrypted: i=1; AFNElJ/51ZNE9VPFgmxwx8oAdAQJ/JSWb3krE/72uEHSIJeFHvxk7pcyYMIzAB7BLTJPSS0FhxSGSHsWqg3e3O8w@postgresql.org X-Gm-Message-State: AOJu0YyvEiVGyc1uVecaKX8xoKmO8sIHhe8vi7rn8GIqvsrhUaBKahdn jrcu6EehSNdK8CM2wroiF55WmWzEyXEXbc7lCn9ESPLfhDEt2i/cBC/Tnm34dVOUk5YVgmwXAiv 5M5u/gUZEhXVjBzsW7SB62wt5crV+QIPVeiZVVMhr X-Gm-Gg: Acq92OGMpELRAvlVV1/52gm6q1laFbVweuy9CL7ywDIKs5ZNdNnQMab3Q1iP2NH1vM/ Liy/sHfgNSoDjgYAd1CBoUuGXSaXvmg3gbGznJu2p0NQoWEndbdnM0JEYOVmAwAeeOH1P0WBY1K hWIcALZa7XL4GygWPV0fV9o/OP8jSWaQq9eOviyLtLwKsrDSBzNpCXGqV5BfjmlpgeF2znD9qje VzWchB+w28MrXsfvN/2po2HVRjwNQrjS1WKgymj1sQne3Cfn36byEdoQu2Q9t+Uwp4t4MIgEV+B wTgzyjHMIc2dcFrA916L X-Received: by 2002:a0c:e01b:0:b0:8ce:a40d:9b76 with SMTP id 6a1803df08f44-8cee611f947mr21076466d6.23.1780617376093; Thu, 04 Jun 2026 16:56:16 -0700 (PDT) MIME-Version: 1.0 References: <1689313.1780074543@sss.pgh.pa.us> In-Reply-To: From: Jacob Champion Date: Thu, 4 Jun 2026 16:56:04 -0700 X-Gm-Features: AVVi8Cft9cpqolVLMXqZg_WPb3NC1hFiKXB4V86QpI7gwUrr1QRUeb6B0kbQQwM Message-ID: Subject: Re: alert clients when prepared statements are deallocated To: Nathan Bossart Cc: Tom Lane , pgsql-hackers@postgresql.org 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 Wed, Jun 3, 2026 at 2:17=E2=80=AFPM Nathan Bossart wrote: > Hm. So there's actually a pretty obvious problem here. Say a user > executes something like PQsendQuery(conn, "DISCARD ALL") and then tries t= o > execute an lo_* function (modified to use prepared statements) prior to > consuming the result. In that case, the callback won't be called in time > and the LO function will fail. Are you allowed to call lo_*/PQfn() in the middle of an operation like that? I.e. does it work today? --Jacob