Re: [HACKERS] Block level parallel vacuum - Mailing list pgsql-hackers

From Sergei Kornilov
Subject Re: [HACKERS] Block level parallel vacuum
Date
Msg-id 12150251578571304@myt4-a1257bff88cb.qloud-c.yandex.net
Whole thread Raw
In response to Re: [HACKERS] Block level parallel vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [HACKERS] Block level parallel vacuum  (Mahendra Singh Thalor <mahi6run@gmail.com>)
Re: [HACKERS] Block level parallel vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Hello

I noticed that parallel vacuum uses min_parallel_index_scan_size GUC to skip small indexes but this is not mentioned in
documentationfor both vacuum command and GUC itself.
 

+    /* Determine the number of parallel workers to launch */
+    if (lps->lvshared->for_cleanup)
+    {
+        if (lps->lvshared->first_time)
+            nworkers = lps->nindexes_parallel_cleanup +
+                lps->nindexes_parallel_condcleanup - 1;
+        else
+            nworkers = lps->nindexes_parallel_cleanup - 1;
+
+    }
+    else
+        nworkers = lps->nindexes_parallel_bulkdel - 1;

(lazy_parallel_vacuum_indexes)
Perhaps we need to add a comment for future readers, why we reduce the number of workers by 1. Maybe this would be
cleaner?

+    /* Determine the number of parallel workers to launch */
+    if (lps->lvshared->for_cleanup)
+    {
+        if (lps->lvshared->first_time)
+            nworkers = lps->nindexes_parallel_cleanup +
+                lps->nindexes_parallel_condcleanup;
+        else
+            nworkers = lps->nindexes_parallel_cleanup;
+
+    }
+    else
+        nworkers = lps->nindexes_parallel_bulkdel;
+
+   /* The leader process will participate */
+   nworkers--;

I have no more comments after reading the patches.

regards, Sergei



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: MBeena Emerson
Date:
Subject: Re: Error message inconsistency