I think the docs are inconsistent with the commit message and the code (d06215d03) and docs should be corrected, soemthing like so:
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index b135c89005..cd10a6a6fc 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -7302,7 +7302,8 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l of statistics accumulated for this statistics object by <xref linkend="sql-analyze"/>. A zero value indicates that no statistics should be collected. - A negative value says to use the system default statistics target. + A negative value says to use the maximum of the statistics targets of + the referenced columns, if set, or the system default statistics target. Positive values of <structfield>stxstattarget</structfield> determine the target number of <quote>most common values</quote> to collect. diff --git a/doc/src/sgml/ref/alter_statistics.sgml b/doc/src/sgml/ref/alter_statistics.sgml index be4c3f1f05..f2e8a93166 100644 --- a/doc/src/sgml/ref/alter_statistics.sgml +++ b/doc/src/sgml/ref/alter_statistics.sgml @@ -101,7 +101,8 @@ ALTER STATISTICS <replaceable class="parameter">name</replaceable> SET STATISTIC The statistic-gathering target for this statistics object for subsequent <xref linkend="sql-analyze"/> operations. The target can be set in the range 0 to 10000; alternatively, set it - to -1 to revert to using the system default statistics + to -1 to revert to using the maximum statistics target of the + referenced column's, if set, or the system default statistics target (<xref linkend="guc-default-statistics-target"/>). For more information on the use of statistics by the <productname>PostgreSQL</productname> query planner, refer to -- 2.17.0