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 1waypG-002CzM-1I for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Jun 2026 16:45:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waypF-001uXF-0n for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Jun 2026 16:45:45 +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 1waypE-001uX7-32 for pgsql-bugs@lists.postgresql.org; Sat, 20 Jun 2026 16:45:44 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1waypD-00000001JmB-1JZX for pgsql-bugs@lists.postgresql.org; Sat, 20 Jun 2026 16:45:43 +0000 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-516d0db9372so25262471cf.2 for ; Sat, 20 Jun 2026 09:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781973942; cv=none; d=google.com; s=arc-20240605; b=lduqXMRsb0HLbKOQiKqrlC8T7+t5QXh8kZCaqQOFvV6pEBTszZ0DmiK57SLQOsor2h 7VlHRy1uMAYXKT/5//IUv1hbAna4CzXVDnLWqc5yAZYfMu1fjuqYQBc36UyxfNW1hEF9 KB9R03W0DSfgzxfTfTktvIiKV7+zqrI/D18gc8mQd/N57U8Jrodgt5rwJ373FxXArWYN yrr0FmJzqO7dsKkaEO5vAaJOunpa0/Ic1Fa90h9cwRumYREyavTz3DBcMzFfyKZukSsl iQYPIrdaFJiXVKeZCYuKxMSiQayJUdHreRt7eCK/OA+QLT+AJdW5Urj5/f8cuM1LR4Od RLxQ== 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=vAgwwOXZ7/a6SLjilzbTbAuwmMI+bD4ARo3M2FG09SU=; fh=gCi4zk+8IeXz7fBls5Aj+0+EFGeYUS29inGYfz6G/tc=; b=R/U1ql25hOoB6OYkrFo6HVL/iyIPBdcg7by9L6snB/ukruz7/0DxxpzFMV6az/zYGD NOOiXSoNj1YD0zovYOcnuGPVwQ6zqCotlnYqCpQdsM/pyf7vg2RlN6XFpj9Vpmz5K5QA j2vWJHnn0UJNSrCmQztNuBICddZhsgonUTXQ1tc/HChjYwnulbznMUUOgY1mwyC5nO6B Y8Is36uNCq16NSRldyzwLxUtfPS0nzMQfFhd9w+RDEISQkCWzEiyvGUNNaMZ6IDvFsPG tI7BPXo8QL+rCInRH4Ih9/EIGWG1VS938d4tE4QT8XIL9GMJRYWUtpVTtkqXnYdPCceO 0rAQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fittl.com; s=google; t=1781973942; x=1782578742; darn=lists.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=vAgwwOXZ7/a6SLjilzbTbAuwmMI+bD4ARo3M2FG09SU=; b=Adp1+VDOE3ejWys0zEjvLk5OCjZPUyex6kyeNK4rNlxlN+ykb5S1A7ZBJ3nBisfOBG ZND6TfCouljtF4TZZQt08ZWQ+tEkSSt3ttck1MX7Rt/elTG4HTzmdMdz7V0pyO5UQuxL 2a69H9gnlpFPWjca/Zlkbqzkyagi6rW/3f6rE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781973942; x=1782578742; 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=vAgwwOXZ7/a6SLjilzbTbAuwmMI+bD4ARo3M2FG09SU=; b=mvqtyYr3PDclatxR6KSW6P9cCzT9h0gpnufmv42LhK6b24SFOsr9ynZfcXC+B2FLjq bzfK2o/cSrYg74CvF6xmvHHCX2ZagJYJYB7MIRPAWCLhIIUuUwxzSM3135NtLDzs4Y2+ xAeQwq02MrOJieYkY3qEMNWC7lhlqBRmTNO14GXv4TjcgaOfX2zsVCGd/VxrZSlDinFI aot1DZHzuNMipTh9EY0YAzVkYV4plRRsZDF+MRwStMlX3cYbKxteBBFAd58vvKRFX/Lb AiLbncS+KI9xIJZTXWaREt0HG4MXFUEkSwJ67hyUTNWedfpjBEDNrF/1NH1mTH3grNNA klmg== X-Forwarded-Encrypted: i=1; AFNElJ/yjzpAvBh9bvJ28a7Ky2jmVsn1/W6CDX5jzE5Vcp4EPohB1Cgdt7eED9pmytDI0KN10acW+zPM+NGc@lists.postgresql.org X-Gm-Message-State: AOJu0YziY7n2VrTdmnv7zO+BuzH0ocZ4a8H+3Mek87dNgJLoPxt0i8Bh zKo1uSjw0EOzAnchmLNo3zRASR8udWKUXZb38ruQo7tuYhbdsgmFCbKtbmq56MgxnNOVvFwGt+x tOYPYUGwrihQB778ce2qNJbiibUXtvNKNSJFC/iHe X-Gm-Gg: AfdE7cn4JITduF951EzxW4iWpnr9+iaVI/gyw2DXPRqjH1Dn8g5uWtXFW22qwyZU0cj PyESGodrlTFkJHuv0cL2f0Lr3RkLAWYOlOU7J+0xiJiA134DhuChoAXoyVDd3uHOqBEWY/L9n02 rZN02O2ksxZpNE3MGncd/fyTjZ+Od6OW9aqxhfiGEqU9SP8dccVGSQOU+zjAHzBL7uZII/iyYCf XIdzkbM8KfFNiK+jbJdVr2HvVD52slyQzD8UAivVhy/5L/zfswz0e99gbXH3yos6EyXi6Mkrrow urXNXySqfYSxcomKTX7Hd2uTRFfp8w== X-Received: by 2002:a05:622a:1793:b0:517:a023:39a9 with SMTP id d75a77b69052e-519e4bf75ddmr125457091cf.28.1781973942151; Sat, 20 Jun 2026 09:45:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lukas Fittl Date: Sat, 20 Jun 2026 09:45:05 -0700 X-Gm-Features: AVVi8CeCTWTe1wx2JLDMG8YXDNRFHGRBHR6jzX_qNxKFRq5Jm8Mby0XoHjI8_Js Message-ID: Subject: Re: BUG #19520: PANIC when concurrently manipulating stored procedures with pg_stat_statements and track_functions = To: Michael Paquier Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Ayush Tiwari , Sami Imseih , zlh21343@163.com, pgsql-bugs@lists.postgresql.org, Andres Freund , Kyotaro Horiguchi 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 Sat, Jun 20, 2026 at 5:16=E2=80=AFAM Michael Paquier wrote: > > On Sat, Jun 20, 2026 at 01:09:59PM +0200, Alvaro Herrera wrote: > > I think a better answer is to just not introduce the ABI change in > > stable branches. That is, I think we should add a shim function so tha= t > > the third-party extensions can continue to use the original ABI; and > > only in master you clean that up with a different API, whereby the > > extension will be forced to have an #ifdef block for the 19 version or > > the older versions, but that's fine because the extension has to be > > recompiled for the new major version anyway so the end-user won't be > > affected on a minor upgrade. > > If you feel strongly about it, we could just do something like the > attached in the v15-v18 range. This introduces a new routine called > pgstat_drop_entry_ext() that gains the new argument "missing_ok", and > pgstat_drop_entry() would be an ABI-compatible wrapper calling it. > > What do you think? As the developer of the extension in the picture, I was actually surprised to see the commit making an ABI *and* API breaking change (and I think with cumulative stats being pluggable in 18, we can expect people to use public stats functions like pgstat_drop_entry in extensions), precisely because of the issues Alvaro mentioned. I think doing it with a new routine is what I would have expected to happen to preserve API and ABI compatibility, and your follow-up patch looks good to me. Thanks, Lukas -- Lukas Fittl