1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Ensure default-only storage parameters for TOAST relations

to be initialized with proper values. Affected parameters are
fillfactor, analyze_threshold, and analyze_scale_factor.

Especially uninitialized fillfactor caused inefficient page usage
because we built a StdRdOptions struct in which fillfactor is zero
if any reloption is set for the toast table.

In addition, we disallow toast.autovacuum_analyze_threshold and
toast.autovacuum_analyze_scale_factor because we didn't actually
support them; they are always ignored.

Report by Rumko on pgsql-bugs on 12 May 2010.
Analysis by Tom Lane and Alvaro Herrera. Patch by me.

Backpatch to 8.4.
This commit is contained in:
Itagaki Takahiro
2010-06-07 03:01:35 +00:00
parent 32c6702f4d
commit 634b1614a0
2 changed files with 18 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.114.2.2 2010/05/13 18:54:23 tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.114.2.3 2010/06/07 03:01:34 itagaki Exp $
PostgreSQL documentation
-->
@ -770,7 +770,7 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
</varlistentry>
<varlistentry>
<term><literal>autovacuum_analyze_threshold</>, <literal>toast.autovacuum_analyze_threshold</literal> (<type>integer</>)</term>
<term><literal>autovacuum_analyze_threshold</> (<type>integer</>)</term>
<listitem>
<para>
Minimum number of inserted, updated, or deleted tuples before initiate an
@ -780,7 +780,7 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
</varlistentry>
<varlistentry>
<term><literal>autovacuum_analyze_scale_factor</>, <literal>toast.autovacuum_analyze_scale_factor</literal> (<type>float4</>)</term>
<term><literal>autovacuum_analyze_scale_factor</> (<type>float4</>)</term>
<listitem>
<para>
Multiplier for <structfield>reltuples</> to add to