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 1wSzMt-000F7k-0d for pgsql-hackers@arkaria.postgresql.org; Fri, 29 May 2026 15:43: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 1wSzMr-0032SO-1b for pgsql-hackers@arkaria.postgresql.org; Fri, 29 May 2026 15:43: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 1wSzMr-0032SF-0X for pgsql-hackers@lists.postgresql.org; Fri, 29 May 2026 15:43:25 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wSzMo-00000000A3G-2Nhd for pgsql-hackers@postgresql.org; Fri, 29 May 2026 15:43:24 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-8ccdf8d4ac5so13341116d6.1 for ; Fri, 29 May 2026 08:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780069400; cv=none; d=google.com; s=arc-20240605; b=eusufYrnaCVjsYA1Xy8dz8d5e2aFWGufCe7kcDv7fQG7Eff+iNryYUr+PmnlntYuqq WFhlM3j6o3No+Dmw0m4WnU/IH8sRlNujeQLO89wleAlkVamVEMo9W+o7vgs1isJRRf+B cG50ZB9LTLM0qoYb+8sdejjuRWLtt7mVWeVRn7qPfj/V6SHXK5v5V1PeSei7MMk8FSvO 1BFYB/+1fRdRSQX4Th0eZs+remqCqvDBCAlaPy9zq+rNG+ArV1S5V+m7PboTNZqCAKUW DzG8yjxwwhQK74QEWqbn1GM0i6FB5rZT2skt1mAtX4VeJkHgeJv7Hb/hR70o3NfINNVJ 89pA== 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=a4do5bCRcs9lbdmvGec3hcdEhk8I73EG3bbGJz/DGLk=; fh=GB7TmI7M6Y28qT2ZDqtrTWnAHNonaFJx+hcppf1fpwA=; b=f9PruFR5CLgBGwjYpGpNAR8nRANoW0Ka/uOxA18PdMvSN2bcinVQIaZHfWKuXQ6l51 VYUD0Fb8JFIJZ++IhaxI7LZJhAvGK10Ni5L+U8a+XyGf8SlQFndTeqx+2uQa+n6fWCxG bkpGNksxjNLBD9T0dRhfO/jEFMFA5b8JVzvwTr4/Rg5sDHBbaPADuwK58YYIbVsZkrVR nfAUBux6oOh5cri1ZU3K4AiCtVheXhp9hTA18dEOFBUhxdg6UY42NedsSFbwBfBqTTKj 2272q8DwPlxx65bteJmZktpL2ZNycDmJUyXLc3Fuqcj9qsHRR6pssP9TCAhZPS4ycsF+ Rbnw==; 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=1780069400; x=1780674200; 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=a4do5bCRcs9lbdmvGec3hcdEhk8I73EG3bbGJz/DGLk=; b=iSbSUMnrevh7ZwhvedDMRoH+2EUNykHUhXD2YY+lP+dK3G+VgYeCReWP6rWxdhOM3M t4JXXvDAMNZJ+RM/jK8xhRrZ++ifwEEWW5xTGQmgaLdjSt59ScXU0uRCfsG1+V5w7q4r guxxXBmaTjLP2stRYQywSmcd6OFXB2kuQmUiSf5w6AxenzLK6aKLtU29vkohmMQvMRt8 rd/yp/pgZstwIrYNNNA19OCsZ1Y3onMZGYcDfbXP2PywxxwJjSKr5/NpHr2FkALX7gIC T1tx2NFd4surHLYDS2uWoj+oAXurw7bT4l6cOP3KW+9tJMqoNu1Ygt7DQV0lPOU1hsj1 +lgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780069400; x=1780674200; 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=a4do5bCRcs9lbdmvGec3hcdEhk8I73EG3bbGJz/DGLk=; b=GGN+0HmeMH7acUEHzG1mmjlfguoZMBfqLtKOb/hKwgSkEvrpf1qI9b8GWOTgerarhc ioTBQekArw3+wwxn8fRn7UcCS3gXCztelm2lTZoAvXqPUK6dRDJGyrR5xwLMEIi/0AMt V/5mKbM7m4/e4v5MJUL9zEMTM5qA9jAh1u/IcuWlXS2sBipM1kdo78hMvHd5Piq0nsVP MmlRJ/XI1ISTxKtwsqg91G6PvI6EkdIP0JFZU81DPEnfnVO9o52gzo8lMBjOqkj27IiY O40Z470mshqxNXyWaQOqPlD+G3GE7koywRFZKs6gI8HqWqG60BYUAfFl3aVGoZqGD7JE zBfg== X-Gm-Message-State: AOJu0YwWqT4a49jhkt3RGri9OzMzMI5R7+naC0TFkqhwu2i8YQ+UESsC 6Ub5Y8NbvNo49aUykBM+C+8JVtM6Qz994lslu4enpe1jXNSBkcMuqaGIF1jpI6wqDI+MdtmVL3A XufgNUBG7yImYkgUcCIpNQJV9PQ98rmiPx6LqHT0x X-Gm-Gg: Acq92OHEE/vL7doe7qbdcDOwQtNYDqcVFojTpO2iPQ3WZyd0pwFaIlrytm9ifBPNv3N TLZmEoPEysB7O5Ptr9fcgHHRxc9YWRgMFH59zZuvidQjEUyA3XlYOdhxQn9J7mzGQomt/YCVmvR POO3woTGposs9utg93JV8EW9TejMd+EyaAQNBqLD6e1/6/XeWFoXfkRv3mr5xA8jgLf9QuNsRSu rnD7T4KZoLqsBUUW6kjm1TWdWlrNkHY/wMm3Uauc9VfUGAw4tcrUr3Ezxpcxkezv+qy93tmr7r+ IspUCv7U97eNaKKES18yyby4SJOVt6I= X-Received: by 2002:a05:6214:d4e:b0:8ac:a4f9:da7b with SMTP id 6a1803df08f44-8ccefdc0948mr3933936d6.29.1780069398695; Fri, 29 May 2026 08:43:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jacob Champion Date: Fri, 29 May 2026 08:43:07 -0700 X-Gm-Features: AVHnY4I7x0SNWs341YCDiS_W85_zRRUElsRx7n8bpgsYPrXSy5A6e75fB2QbU4c Message-ID: Subject: Re: future of PQfn() To: Nathan Bossart Cc: 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 Fri, May 29, 2026 at 8:14=E2=80=AFAM Nathan Bossart wrote: > Here is a work-in-progress patch set that goes this direction. At a high level, I think advertising support for a single new message needs to be done in a protocol extension rather than a minor version bump. > This > introduces a callback mechanism in libpq that is used to handle statement > deallocation notifications. Older servers/clients fall back to > PQexecParams(), which is slower, but the alternative is to leave PQnfn() > and related code around indefinitely. IMO there's no hurry in getting rid of that path. If we decide to go this direction, a fallback to PQnfn() seems like it'd fine for a few releases; we could eventually swap to a PQexecParams() fallback and get rid of the extra code once the older servers have aged out. > I'm wondering whether this new message type is general enough. For > example, perhaps we could make an extensible message type for tracking > various things. And I want to ensure this is useful for other clients, > too. If it's just a general notification message, what does negotiating "support" mean? Is best-effort notification okay, if the client has no idea what a future message type means, or if the server doesn't send the specific type of message the client is hoping for? (In general, I'm kind of down on the "notify the client that X happened" method of working around architectural issues. Maybe that's what we need to move this specific part forward, but it doesn't feel like a long-term solution and I don't know that we need to genericize it without a solid set of use cases.) --Jacob