| From: | Robert Haas <rhaas(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add pg_stash_advice contrib module. |
| Date: | 2026-04-06 11:57:03 |
| Message-ID: | E1w9iZi-003Ds0-1z@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add pg_stash_advice contrib module.
This module allows plan advice strings to be provided automatically
from an in-memory advice stash. Advice stashes are stored in dynamic
shared memory and must be recreated and repopulated after a server
restart. If pg_stash_advice.stash_name is set to the name of an advice
stash, and if query identifiers are enabled, the query identifier
for each query will be looked up in the advice stash and the
associated advice string, if any, will be used each time that query
is planned.
Reviewed-by: Lukas Fittl <lukas(at)fittl(dot)com>
Reviewed-by: Alexandra Wang <alexandra(dot)wang(dot)oss(at)gmail(dot)com>
Reviewed-by: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Reviewed-by: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Discussion: http://postgr.es/m/CA+TgmoaeNuHXQ60P3ZZqJLrSjP3L1KYokW9kPfGbWDyt+1t=Ng@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e8ec19aa321abc89fb4fd277c994f14680ba17db
Modified Files
--------------
contrib/Makefile | 1 +
contrib/meson.build | 1 +
contrib/pg_stash_advice/Makefile | 27 +
.../pg_stash_advice/expected/pg_stash_advice.out | 331 +++++++++++
.../expected/pg_stash_advice_utf8.out | 16 +
.../expected/pg_stash_advice_utf8_1.out | 8 +
contrib/pg_stash_advice/meson.build | 37 ++
contrib/pg_stash_advice/pg_stash_advice--1.0.sql | 43 ++
contrib/pg_stash_advice/pg_stash_advice.c | 605 +++++++++++++++++++++
contrib/pg_stash_advice/pg_stash_advice.control | 5 +
contrib/pg_stash_advice/pg_stash_advice.h | 99 ++++
contrib/pg_stash_advice/sql/pg_stash_advice.sql | 150 +++++
.../pg_stash_advice/sql/pg_stash_advice_utf8.sql | 16 +
contrib/pg_stash_advice/stashfuncs.c | 306 +++++++++++
doc/src/sgml/contrib.sgml | 1 +
doc/src/sgml/filelist.sgml | 1 +
doc/src/sgml/pgstashadvice.sgml | 216 ++++++++
src/tools/pgindent/typedefs.list | 6 +
18 files changed, 1869 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2026-04-06 12:31:28 | Re: pgsql: Convert all remaining subsystems to use the new shmem allocation |
| Previous Message | Aleksander Alekseev | 2026-04-06 11:55:21 | Re: pgsql: Introduce a new mechanism for registering shared memory areas |