diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index 62af2b21fd7..8f09d728698 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -151,7 +151,6 @@ CREATE EXTENSION extension_name; <ree; &pageinspect; &passwordcheck; - &pgstashadvice; &pgbuffercache; &pgcollectadvice; &pgcrypto; @@ -161,6 +160,7 @@ CREATE EXTENSION extension_name; &pgplanadvice; &pgprewarm; &pgrowlocks; + &pgstashadvice; &pgstatstatements; &pgstattuple; &pgsurgery; diff --git a/doc/src/sgml/pgstashadvice.sgml b/doc/src/sgml/pgstashadvice.sgml index d1878f4f7c1..79b89beba38 100644 --- a/doc/src/sgml/pgstashadvice.sgml +++ b/doc/src/sgml/pgstashadvice.sgml @@ -10,7 +10,7 @@ The pg_stash_advice extension allows you to stash plan advice strings in dynamic - shared memory where they can be automatically applied. An + shared memory where they can be automatically applied. An advice stash is a mapping from query identifiers to plan advice strings. Whenever a session is asked to plan a query whose query ID appears @@ -25,7 +25,7 @@ In order to use this module, you will need to execute CREATE EXTENSION pg_stash_advice in at least one database, so that you have access to the SQL functions to manage - advice stashes. You will also need the pg_stash_advice + advice stashes. You will also need the pg_stash_advice module to be loaded in all sessions where you want this module to automatically apply advice. It will usually be best to do this by adding pg_stash_advice to @@ -54,12 +54,12 @@ string that you wish to store for each query. One way to do this is to use EXPLAIN: the VERBOSE option will show the query ID, and the PLAN_ADVICE option will - show plan advice. can be used to + show plan advice. can be used to obtain this information for an entire workload, although care must be taken since it can use up a lot of memory very quickly. Query identifiers can also be obtained through tools such as or , but these tools - will not provide plan advice strings. Note that + will not provide plan advice strings. Note that must be enabled for query identifiers to be computed; if set to auto, loading pg_stash_advice will enable it automatically. @@ -84,7 +84,9 @@ pg_stash_advice.stash_name for their session, and this may reveal the contents of any advice stash with that name. Users should assume that information embedded in stashed advice strings may become visible - to nonprivileged users. + to nonprivileged users. However, advice targets are the only explicit + userspace data present in advice strings and most catalog contents are + considered non-privileged in PostgreSQL. @@ -102,7 +104,8 @@ - Creates a new, empty advice stash with the given name. + Creates a new, empty advice stash with the given name, which must not be + zero length. @@ -134,10 +137,13 @@ Stores an advice string in the named advice stash, associated with - the given query identifier. If an entry for that query identifier - already exists in the stash, it is replaced. If + the given query identifier. If an entry for that query identifier + already exists in the stash, it is replaced. If advice_string is NULL, - any existing entry for that query identifier is removed. + any existing entry for that query identifier is removed. A zero length advice + string is stored in the stash. An error is raised if stash_name does + not exist. Passing NULL for the query identifier results in a silent no-op, + and passing 0 is not permitted, but otherwise, any bigint value is accepted. @@ -170,7 +176,7 @@ - Returns one row for each entry in the named advice stash. If + Returns one row for each entry in the named advice stash. If stash_name is NULL, returns entries from all stashes. @@ -197,7 +203,7 @@ Specifies the name of the advice stash to consult during query - planning. The default value is the empty string, which disables + planning. The default value is the empty string, which disables this module.