Skip to content

Commit 26853a8

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 da1a5da commit 26853a8

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

doc/src/sgml/indexam.sgml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ amcostestimate (PlannerInfo *root,
383383
Cost *indexStartupCost,
384384
Cost *indexTotalCost,
385385
Selectivity *indexSelectivity,
386-
double *indexCorrelation);
386+
double *indexCorrelation,
387+
double *indexPages);
387388
</programlisting>
388389
Estimate the costs of an index scan. This function is described fully
389390
in <xref linkend="index-cost-estimation">, below.
@@ -1151,7 +1152,8 @@ amcostestimate (PlannerInfo *root,
11511152
Cost *indexStartupCost,
11521153
Cost *indexTotalCost,
11531154
Selectivity *indexSelectivity,
1154-
double *indexCorrelation);
1155+
double *indexCorrelation,
1156+
double *indexPages);
11551157
</programlisting>
11561158

11571159
The first three parameters are inputs:
@@ -1193,7 +1195,7 @@ amcostestimate (PlannerInfo *root,
11931195
</para>
11941196

11951197
<para>
1196-
The last four parameters are pass-by-reference outputs:
1198+
The last five parameters are pass-by-reference outputs:
11971199

11981200
<variablelist>
11991201
<varlistentry>
@@ -1232,6 +1234,15 @@ amcostestimate (PlannerInfo *root,
12321234
</para>
12331235
</listitem>
12341236
</varlistentry>
1237+
1238+
<varlistentry>
1239+
<term><parameter>*indexPages</parameter></term>
1240+
<listitem>
1241+
<para>
1242+
Set to number of index leaf pages
1243+
</para>
1244+
</listitem>
1245+
</varlistentry>
12351246
</variablelist>
12361247
</para>
12371248

@@ -1279,6 +1290,11 @@ amcostestimate (PlannerInfo *root,
12791290
table.
12801291
</para>
12811292

1293+
<para>
1294+
The <parameter>indexPages</parameter> should be set to the number of leaf pages.
1295+
This is used to estimate the number of workers for parallel index scan.
1296+
</para>
1297+
12821298
<para>
12831299
When <parameter>loop_count</> is greater than one, the returned numbers
12841300
should be averages expected for any one scan of the index.

0 commit comments

Comments
 (0)