pg.ddx.io pgsql-docs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Add missing references to database object statistics manipulation functions in documentation 4+ messages / 2 participants [nested] [flat]
* Add missing references to database object statistics manipulation functions in documentation @ 2025-05-22 11:17 Fujii Masao <masao.fujii@oss.nttdata.com> 0 siblings, 1 reply; 4+ messages in thread From: Fujii Masao @ 2025-05-22 11:17 UTC (permalink / raw) To: pgsql-docs@lists.postgresql.org Hi, I noticed that the documentation is missing references to the database object statistics manipulation functions such as pg_restore_relation_stats in a few relevant places. For instance, the MAINTAIN privilege section lists allowed operations but doesn't mention these functions, even though they're covered. Likewise, the pg_class catalog section describes what can update fields like reltuples, but omits these functions, which also affect those fields. So I'd like to propose adding these missing references to improve clarity. Patch attached. Thought? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION From 6e02b416f7742adb6fe82aef4692d455a27d4cf6 Mon Sep 17 00:00:00 2001 From: Fujii Masao <fujii@postgresql.org> Date: Thu, 22 May 2025 16:35:45 +0900 Subject: [PATCH v1] doc: Add documentation references for database object statistics functions. Database object statistics manipulation functions were introduced in PostgreSQL 18. However, references to these functions were missing in several relevant parts of the documentation. For example, the documentation for the MAINTAIN privilege lists permitted operations but omitted mention of the statistics functions, even though they are allowed under that privilege. Similarly, the description of the pg_class catalog explains which operations can update fields like reltuples, but did not include the statistics functions, which also affect these fields. This commit updates the documentation to explicitly reference database object statistics manipulation functions where appropriate. --- doc/src/sgml/catalogs.sgml | 24 ++++++++++++++++-------- doc/src/sgml/ddl.sgml | 5 +++-- doc/src/sgml/perform.sgml | 10 +++++++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index cbd4e40a320..60d4c989aba 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2032,8 +2032,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l Size of the on-disk representation of this table in pages (of size <symbol>BLCKSZ</symbol>). This is only an estimate used by the planner. It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, - <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + <link linkend="sql-analyze"><command>ANALYZE</command></link>, a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. </para></entry> </row> @@ -2044,8 +2046,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l <para> Number of live rows in the table. This is only an estimate used by the planner. It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, - <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + <link linkend="sql-analyze"><command>ANALYZE</command></link>, a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. If the table has never yet been vacuumed or analyzed, <structfield>reltuples</structfield> contains <literal>-1</literal> indicating that the row count is @@ -2061,8 +2065,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, - <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + <link linkend="sql-analyze"><command>ANALYZE</command></link>, a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. </para></entry> </row> @@ -2081,8 +2087,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, <link linkend="sql-analyze"><command>ANALYZE</command></link>, - and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. </para></entry> </row> diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fcd1cb85352..96936bcd3ae 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -2223,8 +2223,9 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Allows <command>VACUUM</command>, <command>ANALYZE</command>, <command>CLUSTER</command>, <command>REFRESH MATERIALIZED VIEW</command>, - <command>REINDEX</command>, and <command>LOCK TABLE</command> on a - relation. + <command>REINDEX</command>, <command>LOCK TABLE</command>, + and database object statistics manipulation functions + (see <xref linkend="functions-admin-statsmod"/>) on a relation. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index 106583fb296..acea2d2ac47 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -1253,8 +1253,10 @@ WHERE relname LIKE 'tenk1%'; For efficiency reasons, <structfield>reltuples</structfield> and <structfield>relpages</structfield> are not updated on-the-fly, and so they usually contain somewhat out-of-date values. - They are updated by <command>VACUUM</command>, <command>ANALYZE</command>, and a - few DDL commands such as <command>CREATE INDEX</command>. A <command>VACUUM</command> + They are updated by <command>VACUUM</command>, <command>ANALYZE</command>, + a few DDL commands such as <command>CREATE INDEX</command>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. A <command>VACUUM</command> or <command>ANALYZE</command> operation that does not scan the entire table (which is commonly the case) will incrementally update the <structfield>reltuples</structfield> count on the basis of the part @@ -1281,7 +1283,9 @@ WHERE relname LIKE 'tenk1%'; system catalog. Entries in <structname>pg_statistic</structname> are updated by the <command>ANALYZE</command> and <command>VACUUM ANALYZE</command> commands, and are always approximate even when freshly - updated. + updated. They can also be updated by + <function>pg_restore_attribute_stats</function> and + <function>pg_clear_attribute_stats</function>. </para> <indexterm> -- 2.49.0 Attachments: [text/plain] v1-0001-doc-Add-documentation-references-for-database-obj.patch (6.7K, ../../7c7e1ad5-fdf9-486f-bc63-40ac99b0461d@oss.nttdata.com/2-v1-0001-doc-Add-documentation-references-for-database-obj.patch) download | inline diff: From 6e02b416f7742adb6fe82aef4692d455a27d4cf6 Mon Sep 17 00:00:00 2001 From: Fujii Masao <fujii@postgresql.org> Date: Thu, 22 May 2025 16:35:45 +0900 Subject: [PATCH v1] doc: Add documentation references for database object statistics functions. Database object statistics manipulation functions were introduced in PostgreSQL 18. However, references to these functions were missing in several relevant parts of the documentation. For example, the documentation for the MAINTAIN privilege lists permitted operations but omitted mention of the statistics functions, even though they are allowed under that privilege. Similarly, the description of the pg_class catalog explains which operations can update fields like reltuples, but did not include the statistics functions, which also affect these fields. This commit updates the documentation to explicitly reference database object statistics manipulation functions where appropriate. --- doc/src/sgml/catalogs.sgml | 24 ++++++++++++++++-------- doc/src/sgml/ddl.sgml | 5 +++-- doc/src/sgml/perform.sgml | 10 +++++++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index cbd4e40a320..60d4c989aba 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2032,8 +2032,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l Size of the on-disk representation of this table in pages (of size <symbol>BLCKSZ</symbol>). This is only an estimate used by the planner. It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, - <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + <link linkend="sql-analyze"><command>ANALYZE</command></link>, a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. </para></entry> </row> @@ -2044,8 +2046,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l <para> Number of live rows in the table. This is only an estimate used by the planner. It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, - <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + <link linkend="sql-analyze"><command>ANALYZE</command></link>, a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. If the table has never yet been vacuumed or analyzed, <structfield>reltuples</structfield> contains <literal>-1</literal> indicating that the row count is @@ -2061,8 +2065,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l Number of pages that are marked all-visible in the table's visibility map. This is only an estimate used by the planner. It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, - <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + <link linkend="sql-analyze"><command>ANALYZE</command></link>, a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. </para></entry> </row> @@ -2081,8 +2087,10 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>, <link linkend="sql-analyze"><command>ANALYZE</command></link>, - and a few DDL commands such as - <link linkend="sql-createindex"><command>CREATE INDEX</command></link>. + a few DDL commands such as + <link linkend="sql-createindex"><command>CREATE INDEX</command></link>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. </para></entry> </row> diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fcd1cb85352..96936bcd3ae 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -2223,8 +2223,9 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Allows <command>VACUUM</command>, <command>ANALYZE</command>, <command>CLUSTER</command>, <command>REFRESH MATERIALIZED VIEW</command>, - <command>REINDEX</command>, and <command>LOCK TABLE</command> on a - relation. + <command>REINDEX</command>, <command>LOCK TABLE</command>, + and database object statistics manipulation functions + (see <xref linkend="functions-admin-statsmod"/>) on a relation. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index 106583fb296..acea2d2ac47 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -1253,8 +1253,10 @@ WHERE relname LIKE 'tenk1%'; For efficiency reasons, <structfield>reltuples</structfield> and <structfield>relpages</structfield> are not updated on-the-fly, and so they usually contain somewhat out-of-date values. - They are updated by <command>VACUUM</command>, <command>ANALYZE</command>, and a - few DDL commands such as <command>CREATE INDEX</command>. A <command>VACUUM</command> + They are updated by <command>VACUUM</command>, <command>ANALYZE</command>, + a few DDL commands such as <command>CREATE INDEX</command>, + <function>pg_restore_relation_stats</function>, and + <function>pg_clear_relation_stats</function>. A <command>VACUUM</command> or <command>ANALYZE</command> operation that does not scan the entire table (which is commonly the case) will incrementally update the <structfield>reltuples</structfield> count on the basis of the part @@ -1281,7 +1283,9 @@ WHERE relname LIKE 'tenk1%'; system catalog. Entries in <structname>pg_statistic</structname> are updated by the <command>ANALYZE</command> and <command>VACUUM ANALYZE</command> commands, and are always approximate even when freshly - updated. + updated. They can also be updated by + <function>pg_restore_attribute_stats</function> and + <function>pg_clear_attribute_stats</function>. </para> <indexterm> -- 2.49.0 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Add missing references to database object statistics manipulation functions in documentation @ 2025-06-06 18:11 Robert Treat <rob@xzilla.net> parent: Fujii Masao <masao.fujii@oss.nttdata.com> 0 siblings, 1 reply; 4+ messages in thread From: Robert Treat @ 2025-06-06 18:11 UTC (permalink / raw) To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: pgsql-docs@lists.postgresql.org On Thu, May 22, 2025 at 7:17 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > I noticed that the documentation is missing references to the database > object statistics manipulation functions such as pg_restore_relation_stats > in a few relevant places. For instance, the MAINTAIN privilege section > lists allowed operations but doesn't mention these functions, even though > they're covered. Likewise, the pg_class catalog section describes > what can update fields like reltuples, but omits these functions, > which also affect those fields. > > So I'd like to propose adding these missing references to improve clarity. > Patch attached. Thought? > I'm not enthusiastic about most this patch, mostly because I read the phrasing "are updated by... <commands>" as "are kept up to date periodically by..." rather than "can be manipulated in some way...", especially when you consider that the current wording is most useful because the updating commands have a secondary effect, but pg_restore_relation_stats and pg_clear_relation_stats have a primary purpose of updating stats and are only called in specific circumstances, making the extra information feel excessively detailed. That said, I do very much think it is worth adding this part in, because most people seem to think about MAINTAINS as a way to run utility commands, but I think they might very well be overlooking that there are additional functions that folks will also get access to. diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fcd1cb85352..96936bcd3ae 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -2223,8 +2223,9 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Allows <command>VACUUM</command>, <command>ANALYZE</command>, <command>CLUSTER</command>, <command>REFRESH MATERIALIZED VIEW</command>, - <command>REINDEX</command>, and <command>LOCK TABLE</command> on a - relation. + <command>REINDEX</command>, <command>LOCK TABLE</command>, + and database object statistics manipulation functions + (see <xref linkend="functions-admin-statsmod"/>) on a relation. </para> </listitem> </varlistentry> Robert Treat https://xzilla.net ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Add missing references to database object statistics manipulation functions in documentation @ 2025-06-11 03:50 Fujii Masao <masao.fujii@oss.nttdata.com> parent: Robert Treat <rob@xzilla.net> 0 siblings, 1 reply; 4+ messages in thread From: Fujii Masao @ 2025-06-11 03:50 UTC (permalink / raw) To: Robert Treat <rob@xzilla.net>; +Cc: pgsql-docs@lists.postgresql.org On 2025/06/07 3:11, Robert Treat wrote: > On Thu, May 22, 2025 at 7:17 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: >> I noticed that the documentation is missing references to the database >> object statistics manipulation functions such as pg_restore_relation_stats >> in a few relevant places. For instance, the MAINTAIN privilege section >> lists allowed operations but doesn't mention these functions, even though >> they're covered. Likewise, the pg_class catalog section describes >> what can update fields like reltuples, but omits these functions, >> which also affect those fields. >> >> So I'd like to propose adding these missing references to improve clarity. >> Patch attached. Thought? >> > > I'm not enthusiastic about most this patch, mostly because I read the > phrasing "are updated by... <commands>" as "are kept up to date > periodically by..." rather than "can be manipulated in some way...", > especially when you consider that the current wording is most useful > because the updating commands have a secondary effect, but > pg_restore_relation_stats and pg_clear_relation_stats have a primary > purpose of updating stats and are only called in specific > circumstances, making the extra information feel excessively detailed. I see your point and dropped that part of the patch. > That said, I do very much think it is worth adding this part in, > because most people seem to think about MAINTAINS as a way to run > utility commands, but I think they might very well be overlooking that > there are additional functions that folks will also get access to. Yes, so I've updated the patch to only include the change to the MAINTAIN privilege documentation. Patch attached. Barring any objections, I plan to commit it. > Additionally, this function accepts argument name version of type integer, which specifies > the server version from which the statistics originated. This is anticipated to be helpful in > porting statistics from older versions of PostgreSQL. By the way, while reviewing the docs for pg_restore_relation_stats and pg_restore_attribute_stats, I noticed this description. While it's accurate, the parameter is currently always ignored. Should we document that explicitly? Otherwise, users might waste time trying to figure out what value to set, even though it has no effect. Alternatively, since this isn’t a parameter most users care about, maybe we should just remove the description altogether? Thoughts? Regards, -- Fujii Masao NTT DATA Japan Corporation From 3be5abe72c672f0a75203375ca49f5bb1ecf2949 Mon Sep 17 00:00:00 2001 From: Fujii Masao <fujii@postgresql.org> Date: Wed, 11 Jun 2025 11:34:24 +0900 Subject: [PATCH v2] doc: Document that MAINTAIN privilege allows statistics manipulation functions. Database object statistics manipulation functions were introduced in PostgreSQL 18 and are permitted under the MAINTAIN privilege. However, the documentation previously did not mention these functions in the list of allowed operations. This commit updates the MAINTAIN privilege documentation to explicitly include statistics manipulation functions, clarifying what the privilege covers. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Robert Treat <rob@xzilla.net> Discussion: https://postgr.es/m/7c7e1ad5-fdf9-486f-bc63-40ac99b0461d@oss.nttdata.com --- doc/src/sgml/ddl.sgml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fcd1cb85352..96936bcd3ae 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -2223,8 +2223,9 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Allows <command>VACUUM</command>, <command>ANALYZE</command>, <command>CLUSTER</command>, <command>REFRESH MATERIALIZED VIEW</command>, - <command>REINDEX</command>, and <command>LOCK TABLE</command> on a - relation. + <command>REINDEX</command>, <command>LOCK TABLE</command>, + and database object statistics manipulation functions + (see <xref linkend="functions-admin-statsmod"/>) on a relation. </para> </listitem> </varlistentry> -- 2.49.0 Attachments: [text/plain] v2-0001-doc-Document-that-MAINTAIN-privilege-allows-stati.patch (1.6K, ../../9ab5dbad-ab21-43bf-af73-0a2c636fbfd7@oss.nttdata.com/2-v2-0001-doc-Document-that-MAINTAIN-privilege-allows-stati.patch) download | inline diff: From 3be5abe72c672f0a75203375ca49f5bb1ecf2949 Mon Sep 17 00:00:00 2001 From: Fujii Masao <fujii@postgresql.org> Date: Wed, 11 Jun 2025 11:34:24 +0900 Subject: [PATCH v2] doc: Document that MAINTAIN privilege allows statistics manipulation functions. Database object statistics manipulation functions were introduced in PostgreSQL 18 and are permitted under the MAINTAIN privilege. However, the documentation previously did not mention these functions in the list of allowed operations. This commit updates the MAINTAIN privilege documentation to explicitly include statistics manipulation functions, clarifying what the privilege covers. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Robert Treat <rob@xzilla.net> Discussion: https://postgr.es/m/7c7e1ad5-fdf9-486f-bc63-40ac99b0461d@oss.nttdata.com --- doc/src/sgml/ddl.sgml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index fcd1cb85352..96936bcd3ae 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -2223,8 +2223,9 @@ REVOKE ALL ON accounts FROM PUBLIC; <para> Allows <command>VACUUM</command>, <command>ANALYZE</command>, <command>CLUSTER</command>, <command>REFRESH MATERIALIZED VIEW</command>, - <command>REINDEX</command>, and <command>LOCK TABLE</command> on a - relation. + <command>REINDEX</command>, <command>LOCK TABLE</command>, + and database object statistics manipulation functions + (see <xref linkend="functions-admin-statsmod"/>) on a relation. </para> </listitem> </varlistentry> -- 2.49.0 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Add missing references to database object statistics manipulation functions in documentation @ 2025-06-11 15:54 Robert Treat <rob@xzilla.net> parent: Fujii Masao <masao.fujii@oss.nttdata.com> 0 siblings, 0 replies; 4+ messages in thread From: Robert Treat @ 2025-06-11 15:54 UTC (permalink / raw) To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: pgsql-docs@lists.postgresql.org On Tue, Jun 10, 2025 at 11:50 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > On 2025/06/07 3:11, Robert Treat wrote: > > On Thu, May 22, 2025 at 7:17 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > >> I noticed that the documentation is missing references to the database > >> object statistics manipulation functions such as pg_restore_relation_stats > >> in a few relevant places. For instance, the MAINTAIN privilege section > >> lists allowed operations but doesn't mention these functions, even though > >> they're covered. Likewise, the pg_class catalog section describes > >> what can update fields like reltuples, but omits these functions, > >> which also affect those fields. > >> <snip> > > That said, I do very much think it is worth adding this part in, > > because most people seem to think about MAINTAINS as a way to run > > utility commands, but I think they might very well be overlooking that > > there are additional functions that folks will also get access to. > > Yes, so I've updated the patch to only include the change to > the MAINTAIN privilege documentation. Patch attached. > Barring any objections, I plan to commit it. > +1 from me. > > > Additionally, this function accepts argument name version of type integer, which specifies > > the server version from which the statistics originated. This is anticipated to be helpful in > > porting statistics from older versions of PostgreSQL. > > By the way, while reviewing the docs for pg_restore_relation_stats > and pg_restore_attribute_stats, I noticed this description. > While it's accurate, the parameter is currently always ignored. > Should we document that explicitly? Otherwise, users might waste time > trying to figure out what value to set, even though it has no effect. > Alternatively, since this isn’t a parameter most users care about, > maybe we should just remove the description altogether? Thoughts? > Ah, nice catch. It could probably be removed until it does something useful, but if we wanted to keep it, maybe something like: This function also accepts an argument named "version", of type "integer", that is meant to be used to identify the server version from which the statistics were collected. Although this argument is not yet utilized, it is intended to support migration of statistics from earlier PostgreSQL versions in the future. Robert Treat https://xzilla.net ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-06-11 15:54 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-05-22 11:17 Add missing references to database object statistics manipulation functions in documentation Fujii Masao <masao.fujii@oss.nttdata.com> 2025-06-06 18:11 ` Robert Treat <rob@xzilla.net> 2025-06-11 03:50 ` Fujii Masao <masao.fujii@oss.nttdata.com> 2025-06-11 15:54 ` Robert Treat <rob@xzilla.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox