]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add pg_stash_advice contrib module.
authorRobert Haas <rhaas@postgresql.org>
Mon, 6 Apr 2026 11:41:28 +0000 (07:41 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 6 Apr 2026 11:41:28 +0000 (07:41 -0400)
commite8ec19aa321abc89fb4fd277c994f14680ba17db
treec7d0f7ff30f030f353b1d3d23a04f3b384d23878
parent404a17c155ac6e80d990fb0625569a3854f7090d
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@fittl.com>
Reviewed-by: Alexandra Wang <alexandra.wang.oss@gmail.com>
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Reviewed-by: Jakub Wartak <jakub.wartak@enterprisedb.com>
Discussion: http://postgr.es/m/CA+TgmoaeNuHXQ60P3ZZqJLrSjP3L1KYokW9kPfGbWDyt+1t=Ng@mail.gmail.com
18 files changed:
contrib/Makefile
contrib/meson.build
contrib/pg_stash_advice/Makefile [new file with mode: 0644]
contrib/pg_stash_advice/expected/pg_stash_advice.out [new file with mode: 0644]
contrib/pg_stash_advice/expected/pg_stash_advice_utf8.out [new file with mode: 0644]
contrib/pg_stash_advice/expected/pg_stash_advice_utf8_1.out [new file with mode: 0644]
contrib/pg_stash_advice/meson.build [new file with mode: 0644]
contrib/pg_stash_advice/pg_stash_advice--1.0.sql [new file with mode: 0644]
contrib/pg_stash_advice/pg_stash_advice.c [new file with mode: 0644]
contrib/pg_stash_advice/pg_stash_advice.control [new file with mode: 0644]
contrib/pg_stash_advice/pg_stash_advice.h [new file with mode: 0644]
contrib/pg_stash_advice/sql/pg_stash_advice.sql [new file with mode: 0644]
contrib/pg_stash_advice/sql/pg_stash_advice_utf8.sql [new file with mode: 0644]
contrib/pg_stash_advice/stashfuncs.c [new file with mode: 0644]
doc/src/sgml/contrib.sgml
doc/src/sgml/filelist.sgml
doc/src/sgml/pgstashadvice.sgml [new file with mode: 0644]
src/tools/pgindent/typedefs.list