Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iE0HA-0002ez-Up for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Sep 2019 00:07:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iE0H8-000477-43 for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Sep 2019 00:07:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iE0H7-00046y-Mc for pgsql-hackers@lists.postgresql.org; Sat, 28 Sep 2019 00:07:49 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iE0H4-0003d8-PQ for pgsql-hackers@postgresql.org; Sat, 28 Sep 2019 00:07:49 +0000 Received: by mail-pl1-x636.google.com with SMTP id q15so1661258pll.11 for ; Fri, 27 Sep 2019 17:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:mime-version :content-transfer-encoding; bh=+6oZK0a5LSrmHKQukLcb11voK6aQ4xIrFPQ5wYw55nM=; b=ADDQ4XzwJYO3/KF6BD9VnFgqfuMZeYH4mOK+hyPq8R9WdodNrIpnpT+404xoe2moDp D5Kehb9dYIf/kZHcyOEH+8tkMZtIULQQOvN0CtKc7UQ8gLIjIN7ARwpZrJOuj08vj+v2 rtg4bNSJBhxd7cNQyX94r1fa9UVPyfUXnR0YUbeWg7NEpjIzKm5Y2MyBTwlF0t4g18Kd PgkbHRGMSXZ6KzvoWl3n+TGRylK5BaigCNQ9No7NlYNsRyN4MYNmlyZl4gLCWGYriScm FKfXPpzwQRr77ma1XA7rX0W1CRGk0WRMV9eiavX9V8ga2xz52L7PcF/SJtgNdxBwNigD Jpdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:mime-version :content-transfer-encoding; bh=+6oZK0a5LSrmHKQukLcb11voK6aQ4xIrFPQ5wYw55nM=; b=sclFzfHXaN9dZXTxSOpkn5pbf6+Yg0+8crQbkiP2xzsgfCRqyZ1zTHAusB+/mwCypI 0joCsvscjO+OhEOtEYFpDpVp1tB19DRe4xo4vbYaaUc8OMYxazjq6slojVAxfcFWYyVB c+SZZwR+50j7lu0INy7toiUIZtTlF3XhssidbT5htUh6rNM1US+hydX86teE3RxG+KXV Gn3OpDL1Jx0kPf3j4oWLkFSggrx++C2UZ92kSIWLIfHBvE9ESN66Og/UQE2eXYSAenUF e8OxcC0GjmbDSijzwQ8GmTqfX62yLxcIB2hUU1Ubvg8fdjcujAbMqQMeYvdaGE/EjxUr CJnQ== X-Gm-Message-State: APjAAAWD5C/tQCTjkokf54Y09f2zunDhx9j1WGF0LJQri0iVgPanu5Jr RCwUAiKYAgLTCPUduCDcTLsOsQhoDx8= X-Google-Smtp-Source: APXvYqxa60zV2hbyOlt7sK3326uie2mIrjG9MfrijSmedbbC52sAlwjV1Yc/9tgHjedlhckfiJ+UcQ== X-Received: by 2002:a17:902:9b83:: with SMTP id y3mr8074603plp.25.1569629262916; Fri, 27 Sep 2019 17:07:42 -0700 (PDT) Received: from jdavis ([2600:1010:b068:c25a:3d88:ab4c:d601:44c6]) by smtp.gmail.com with ESMTPSA id u3sm3599676pfn.134.2019.09.27.17.07.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Sep 2019 17:07:41 -0700 (PDT) Message-ID: Subject: max_parallel_workers question From: Jeff Davis To: pgsql-hackers@postgresql.org Date: Fri, 27 Sep 2019 17:07:39 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk The current docs for max_parallel_workers start out: "Sets the maximum number of workers that the system can support for parallel operations..." In my interpretation, "the system" means the entire cluster, but the max_parallel_workers setting is PGC_USERSET. That's a bit confusing, because two different backends can have different settings for "the maximum number ... the system can support". max_parallel_workers is compared against the total number of parallel workers in the system, which appears to be why the docs are worded that way. But it's still confusing to me. If the purpose is to make sure parallel queries don't take up all of the worker processes, perhaps we should rename the setting reserved_worker_processes, and make it PGC_SUPERUSER. If the purpose is to control execution within a backend, perhaps we should just compare it to the count of parallel processes that the backend is already using. If the purpose is just to be a more flexible version of max_worker_processes, maybe we should change it to PGC_SIGHUP? If it has multiple purposes, perhaps we should have multiple GUCs? Regards, Jeff Davis