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 1wA7FD-0024oO-2j for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 14:17:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wA7FC-000VFw-19 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 14:17:30 +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 1wA7FC-000VFn-09 for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 14:17:30 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wA7F9-000000017X2-2s27 for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 14:17:29 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-b8f97c626aaso852245466b.2 for ; Tue, 07 Apr 2026 07:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775571445; cv=none; d=google.com; s=arc-20240605; b=ftHBSSkarwLRZ6L934eORXAeOtvM7G6hevPcDqFNS7GjmVSwuAgluegogFqU9AkPEH LbSbzVU8v2QebdRnMUjVA/x39NW8gyzQfA7cKmkuzAuutX3cPtgH8uzwLE3Gg6UXf1Gj hgyWhBq/R/8ejrWN+fBNm/MqliayL+/Ws+GZ6dxTDUV5wgFUQkoqMwgrzJCY9GqddI1y yk5zz5FsjeCXIpqfUmm3VwazfV7ff6Hpd6bLuxhwBdxdP93gxK4tTgmRcQ9yzJM+PA9W Wbi+fy/74uIPjM4pxH62/CIipnZ+OWekAzIXeOoqH5+mv7YkG4Sw7BgXDXoLTTddrffG xMUA== 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=UENJj8OA6opoz3jf2pVMwK6FA3CuhIMqZqJZWKMTwv8=; fh=Gn6pf789Dp+dRgwNAPa/GdxlXSRjpluxviXEQmK9n5M=; b=ahwwtuLKFAWyF+7IhBqMu+2dptueDsz7xyl81BJeDARam7Rpq6cnxvgJkt2xqqrsm3 jP5/eLVvV9Q/Mj5bbJUuXXzlbR3PZZ+6ekvl/GMCjYPbHVnc00EV1U43XjSPo8KnmrxE 9wPcdsKT/PirShmRQK/Q6sdlndIisSTgARqp6j7ugO55X4CVNVDEOZcIfCUKm2X4j7pl Jl5zjZwHezTLDbhquKIBg7GTTzFZHeCKS8kOWseJ4oOGf/np/inT1TvJz2N4XiMBtZpX VYRlVoD6EHiP/jLN7LEudtiKLtnY8WVXNN0tR3LTJYLcIho/fl/FVPxMz/Fy8ruORyud LqSg==; 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=gmail.com; s=20251104; t=1775571445; x=1776176245; 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=UENJj8OA6opoz3jf2pVMwK6FA3CuhIMqZqJZWKMTwv8=; b=h598V+TiLInkJC/tyMmyyN5aXVlGLO0/Lc68Ogs6crVnMV0+mgo+olRVnoJAtrJneZ ApqkFtVt/ysuepypj6Oshybj6RCSfRkDINuG0evqWxthEmdTPshrOnnSOoVDTqABK52c MYMORp7iGzh43AVAPkbblJk0CDS7EgSiR2XWsCCXpHIegvffv3TOb7ZmcihS/Om2oFvL 0pN9W2VPpIoI4knuUI8J2oLpsSL8QGcPTYNi63wYv91AM1n2FGjNE2ZBMBQek4iwKJY9 pMbujnqOnrbdAA/OFTNunqPz65sq8SsrV2XNU4vYNXqgMhXgRqHJws6/9TtkxHa1mNfs 76cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775571445; x=1776176245; 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=UENJj8OA6opoz3jf2pVMwK6FA3CuhIMqZqJZWKMTwv8=; b=A+i6pPngRS9PVNM3Y9EhWVSXCW3z4MeLucW4iI0J4XDpFnkhrcReXpWmivAnkpnFd7 WfYvMduqcJ1opU42VEL2Sn0/D/Xk4jCPEud0xmt5SpHox+jkaf0siRlpgj6BsXKwk5MH Xc6sj6tSdcgCSPYQGkAduWaSY/DnRQ/0x5Y1wNb68h7FU6N00ukGuMzn3NeiCtR43HRS wwUsFVQkz2wSHV5yYT/u8ONFnFkYfpT0Omg75c1OjXK2pW+QVgep/vQDYg7KI0fkK6l9 KP/a4ggnUrrKiY2iYSksjWqnAwuVq6JTPiCr2B24FxB9zrKoSyYYJIEQB2gsTNInZ6g5 UjRw== X-Forwarded-Encrypted: i=1; AJvYcCWbCpJGWjldPMV7/VyTY+uKheebSORwyA1n/xBeiitzi9296tIDjivLeHCyK1HoAzUAPt4ekdF7qCipUrgU@lists.postgresql.org X-Gm-Message-State: AOJu0YzEHV7mIwspUPwFYnqa7qy1KeSCNK81BuxCFXB78bTpKfSO7rA6 KBeDge5Rkqfbzvw4vdfnzJXxhybMz6G7jORnx4AftvptaON8YTbkeDSgNfuDSdEAdCOjBFwpF1y aQU+UC+0+HqNJmFQ6AjNnQ0YD0hsQzrw= X-Gm-Gg: AeBDietGW7AsHpCTkegmMt12rin12EBXQahYx6wa3VXUvdBHSSRBEIq+i6Tz8sbYshQ /MvDFMzvdknnqiucAVXM870iqDSSCQMydoPtEKGE7ZSsvZVG7tYHMrECf0i0qu8WQAkf5Yagq3o gyGl5LrfB51CPv3z3+hQ9vR/3upwaC5pluHxFcDdaC/UNx3POHKJ8KD8LF+djLUpr0Hj1p9zNaX NfImor1igj1LiCmAnGPFR/wwHXDjpTC2By5qAY0/BMIwv8x30JIuX2/knQa3B+v6YsGIyn2Pi48 nXPGvrGtlIhCUOUEJShB46eIgy4Qx4N/OUvqmEw= X-Received: by 2002:a17:907:e106:b0:b83:95c8:15d0 with SMTP id a640c23a62f3a-b9c67b52acbmr594013466b.52.1775571445010; Tue, 07 Apr 2026 07:17:25 -0700 (PDT) MIME-Version: 1.0 References: <1136161.1769654478@sss.pgh.pa.us> <1299934.1773938807@sss.pgh.pa.us> In-Reply-To: From: Robert Haas Date: Tue, 7 Apr 2026 10:17:12 -0400 X-Gm-Features: AQROBzD_QX-gwnyIpYDkBxjvL1qgjG3LnPUqaQ-EFvSbgJ-nkXH4iEc_5aNw_Wo Message-ID: Subject: Re: pg_plan_advice To: Lukas Fittl Cc: Jakub Wartak , Tom Lane , PostgreSQL Hackers 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, Apr 4, 2026 at 4:12=E2=80=AFAM Lukas Fittl wrote: > I think we should document the restrictions on advice names here (i.e. > they must be alphanumeric or contain an underscore, not start with a > digit, and maximum NAMEDATLEN). I committed 0001 without this change. Please feel free to propose a clean-up patch that adds this. I wasn't certain where the best place to add it was, or what the wording ought to be exactly. > > +/* > > + * Remove all stashes and entries from shared memory. > > + * > > + * This is intended to be called before reloading from a dump file, so= that > > + * a failed previous attempt doesn't leave stale data behind. > > + */ > > +void > > +pgsa_reset_all_stashes(void) > > +{ > > I think this might be good to expose on the SQL level as well - in > case someone accidentally created a lot of stashes it could be tedious > to remove them all, e.g. if they wanted to clear all the memory after > an experiment.