From dc444801ba692f773836308a44b2c0ed88af87e5 Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Fri, 10 Aug 2018 14:14:36 +0300 Subject: [PATCH] Add missing documentation for argument of amcostestimate() 5262f7a4fc44 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 --- doc/src/sgml/indexam.sgml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index c72c522175..beb99d1831 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -385,7 +385,8 @@ amcostestimate (PlannerInfo *root, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, - double *indexCorrelation); + double *indexCorrelation, + double *indexPages); Estimate the costs of an index scan. This function is described fully in , below. @@ -1155,7 +1156,8 @@ amcostestimate (PlannerInfo *root, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, - double *indexCorrelation); + double *indexCorrelation, + double *indexPages); The first three parameters are inputs: @@ -1197,7 +1199,7 @@ amcostestimate (PlannerInfo *root, - The last four parameters are pass-by-reference outputs: + The last five parameters are pass-by-reference outputs: @@ -1236,6 +1238,15 @@ amcostestimate (PlannerInfo *root, + + + *indexPages + + + Set to number of index leaf pages + + + @@ -1283,6 +1294,11 @@ amcostestimate (PlannerInfo *root, table. + + The indexPages should be set to the number of leaf pages. + This is used to estimate the number of workers for parallel index scan. + + When loop_count is greater than one, the returned numbers should be averages expected for any one scan of the index. -- 2.40.0