commit 6f3a13ff058f15d565a30c16c0c2cb14cc994e42 Enhance docs for ALTER TABLE lock levels of storage parms Author: Simon Riggs <si...@2ndquadrant.com> Date: Mon Mar 6 16:48:12 2017 +0530
<varlistentry> <term><literal>SET ( <replaceable class="PARAMETER">storage_parameter</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )</literal></term> ... - Changing fillfactor and autovacuum storage parameters acquires a <literal>SHARE UPDATE EXCLUSIVE</literal> lock. + <literal>SHARE UPDATE EXCLUSIVE</literal> lock will be taken for + fillfactor and autovacuum storage parameters, as well as the + following planner related parameters: + effective_io_concurrency, parallel_workers, seq_page_cost + random_page_cost, n_distinct and n_distinct_inherited. effective_io_concurrency, seq_page_cost and random_page_cost cannot be set for a table - reloptions.c shows that they've always been RELOPT_KIND_TABLESPACE. n_distinct lock mode seems to have been changed and documented at e5550d5f ; 21d4e2e2 claimed to do the same, but the LOCKMODE is never used. See also: commit 21d4e2e20656381b4652eb675af4f6d65053607f Reduce lock levels for table storage params related to planning Author: Simon Riggs <si...@2ndquadrant.com> Date: Mon Mar 6 16:04:31 2017 +0530 commit 47167b7907a802ed39b179c8780b76359468f076 Reduce lock levels for ALTER TABLE SET autovacuum storage options Author: Simon Riggs <si...@2ndquadrant.com> Date: Fri Aug 14 14:19:28 2015 +0100 commit e5550d5fec66aa74caad1f79b79826ec64898688 Reduce lock levels of some ALTER TABLE cmds Author: Simon Riggs <si...@2ndquadrant.com> Date: Sun Apr 6 11:13:43 2014 -0400 commit 2dbbda02e7e688311e161a912a0ce00cde9bb6fc Reduce lock levels of CREATE TRIGGER and some ALTER TABLE, CREATE RULE actions. Author: Simon Riggs <si...@2ndquadrant.com> Date: Wed Jul 28 05:22:24 2010 +0000 commit d86d51a95810caebcea587498068ff32fe28293e Support ALTER TABLESPACE name SET/RESET ( tablespace_options ). Author: Robert Haas <rh...@postgresql.org> Date: Tue Jan 5 21:54:00 2010 +0000 Justin
>From 64699ee90ef6ebe9459e3b2b1f603f30ec2c49c8 Mon Sep 17 00:00:00 2001 From: Justin Pryzby <pryz...@telsasoft.com> Date: Sun, 5 Jan 2020 19:39:29 -0600 Subject: [PATCH v1] Fixes for commit 6f3a13ff Should backpatch to v10. --- doc/src/sgml/ref/alter_table.sgml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index bb1e48a..e5f39c2 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -676,32 +676,30 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </varlistentry> <varlistentry> <term><literal>SET ( <replaceable class="parameter">storage_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] )</literal></term> <listitem> <para> - This form changes one or more storage parameters for the table. See + This form changes one or more storage or planner parameters for the table. See <xref linkend="sql-createtable-storage-parameters" endterm="sql-createtable-storage-parameters-title"/> for details on the available parameters. Note that the table contents - will not be modified immediately by this command; depending on the + will not be modified immediately by setting its storage parameters; depending on the parameter you might need to rewrite the table to get the desired effects. That can be done with <link linkend="sql-vacuum">VACUUM FULL</link>, <xref linkend="sql-cluster"/> or one of the forms of <command>ALTER TABLE</command> that forces a table rewrite. For planner related parameters, changes will take effect from the next time the table is locked so currently executing queries will not be affected. </para> <para> <literal>SHARE UPDATE EXCLUSIVE</literal> lock will be taken for fillfactor, toast and autovacuum storage parameters, as well as the - following planner related parameters: - <varname>effective_io_concurrency</varname>, <varname>parallel_workers</varname>, <varname>seq_page_cost</varname>, - <varname>random_page_cost</varname>, <varname>n_distinct</varname> and <varname>n_distinct_inherited</varname>. + <varname>parallel_workers</varname> planner parameter. </para> </listitem> </varlistentry> <varlistentry> <term><literal>RESET ( <replaceable class="parameter">storage_parameter</replaceable> [, ... ] )</literal></term> -- 2.7.4