pg_stash_advice: Allow stashed advice to be persisted to disk.

Robert Haas <rhaas@postgresql.org>

Commit: c10edb102ada607eb054bc9e23690109d86849ef
Author: Robert Haas <rhaas@postgresql.org>
Date: 2026-04-07T14:11:36Z
pg_stash_advice: Allow stashed advice to be persisted to disk.

If pg_stash_advice.persist = true, stashed advice will be written to
pg_stash_advice.tsv in the data directory, periodically and at
shutdown. On restart, stash modifications are locked out until this
file has been reloaded, but queries will not be, so there may be a
short window after startup during which previously-stashed advice is
not automatically applied.

Author: Robert Haas <rhaas@postgresql.org>
Co-authored-by: Lukas Fittl <lukas@fittl.com>
Discussion: https://postgr.es/m/CA+Tgmob87qsWa-VugofU6epuV0H5XjWZGMbQas4Q-ADKmvSyBg@mail.gmail.com

Files

Discussion