Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e01d347

Browse files
committed
Add missing documentation for argument of amcostestimate()
5262f7a have introduced parallel index scan. In order to estimate the number of parallel workers, it adds extra argument to amcostestimate() index access method API function. However, this extra argument was missed in the documentation. This commit fixes that. Discussion: https://postgr.es/m/4128fdb4-8b63-2e05-38f6-3125f8c27263%40lab.ntt.co.jp Author: Tatsuro Yamada, Alexander Korotkov Backpatch-through: 10
1 parent 3abc5a6 commit e01d347

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

doc/src/sgml/indexam.sgml

+19-3
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ amcostestimate (PlannerInfo *root,
385385
Cost *indexStartupCost,
386386
Cost *indexTotalCost,
387387
Selectivity *indexSelectivity,
388-
double *indexCorrelation);
388+
double *indexCorrelation,
389+
double *indexPages);
389390
</programlisting>
390391
Estimate the costs of an index scan. This function is described fully
391392
in <xref linkend="index-cost-estimation"/>, below.
@@ -1155,7 +1156,8 @@ amcostestimate (PlannerInfo *root,
11551156
Cost *indexStartupCost,
11561157
Cost *indexTotalCost,
11571158
Selectivity *indexSelectivity,
1158-
double *indexCorrelation);
1159+
double *indexCorrelation,
1160+
double *indexPages);
11591161
</programlisting>
11601162

11611163
The first three parameters are inputs:
@@ -1197,7 +1199,7 @@ amcostestimate (PlannerInfo *root,
11971199
</para>
11981200

11991201
<para>
1200-
The last four parameters are pass-by-reference outputs:
1202+
The last five parameters are pass-by-reference outputs:
12011203

12021204
<variablelist>
12031205
<varlistentry>
@@ -1236,6 +1238,15 @@ amcostestimate (PlannerInfo *root,
12361238
</para>
12371239
</listitem>
12381240
</varlistentry>
1241+
1242+
<varlistentry>
1243+
<term><parameter>*indexPages</parameter></term>
1244+
<listitem>
1245+
<para>
1246+
Set to number of index leaf pages
1247+
</para>
1248+
</listitem>
1249+
</varlistentry>
12391250
</variablelist>
12401251
</para>
12411252

@@ -1283,6 +1294,11 @@ amcostestimate (PlannerInfo *root,
12831294
table.
12841295
</para>
12851296

1297+
<para>
1298+
The <parameter>indexPages</parameter> should be set to the number of leaf pages.
1299+
This is used to estimate the number of workers for parallel index scan.
1300+
</para>
1301+
12861302
<para>
12871303
When <parameter>loop_count</parameter> is greater than one, the returned numbers
12881304
should be averages expected for any one scan of the index.

0 commit comments

Comments
 (0)