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 1iEGeK-0008Vf-MT for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Sep 2019 17:36: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 1iEGeJ-0008Mv-HI for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Sep 2019 17:36:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEGeI-0008ML-WE for pgsql-hackers@lists.postgresql.org; Sat, 28 Sep 2019 17:36:51 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iEGeG-0004iQ-NL for pgsql-hackers@postgresql.org; Sat, 28 Sep 2019 17:36:49 +0000 Received: by mail-pg1-x533.google.com with SMTP id q7so5072158pgi.12 for ; Sat, 28 Sep 2019 10:36:48 -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:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=tGyByw9IMNmXA8rI/uhxjguGfhHMv36fdyRy2trVfoo=; b=qis/MYF6M2UQ2U5vWgMC/THBaoi8orgvWQRYZYDEA2Vv0qjHpy2zmQdMKiUY3C5Mk9 d2wj2Uvy/A80Q3VslzsdlB2NAe9jlE8NI/hi+AqUbFtW3Y1xIygu8r/iLFL7JJU4+jgM UDFvSCWz1d0hnedj1ProhKhv3XufZj1fvyPitjK0KB4uLYUU7pmxQREwolSNUxnDvg9e m2RUIfuNc3UVyOGSNnIgul9HeYNzjaya0XGUAN0Fx6+6ZVmXT/Lx7DYJYX8ZJnj8lq/w Ukj7UJIh1kAIZh7LECDFIvUJxpQ/9Ph6exs5H5BVZyHtrHFYP+Vm+uJ1dpBOV+0RD5fA VckA== 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:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=tGyByw9IMNmXA8rI/uhxjguGfhHMv36fdyRy2trVfoo=; b=LenW/ZcS0djSefSTMRi8DwXp6MKRPJLV2z3X1V0oBVElu3Ttqk1q3xe62hj0geVn10 XTahFgdMJZ7E4b2olCOgqD0iiNCrKIgRknlLNe2BDU22e+3tn14yF+qwB4KOOxF2tNm0 2ok6H65VSDrRaWdoiBiO5D7Dr41/oeD0rshwaJ5lb34y+ml/qdcMCC3/NAVK/1ajFZXU bfhXCEMZFq/OK3bZGntQE2CEIia+TUALRpF8nDbB/7sdpp6C8keA5gnxqLdwvy9G8yb/ DBv4Pjxt1jAA3AhwPjniz5A2i3VxORPWwwBsbCMoUrYNRdxUq3DAJDH3YwD7ACnwqFV1 gpHw== X-Gm-Message-State: APjAAAWlpV1f1znQFACSSfJ6x8Q045STrBm7xmmvlnG6aTogu08b+1ax /xN+pxNzLuGEYVTDZxe4whFD7w== X-Google-Smtp-Source: APXvYqzSpTS6IUmGRaK3oKWWC2uzGDQJpGJvgz/hfQOzLgulzF3F5WcTXLfajgyksSxOhS3Eg+X9kA== X-Received: by 2002:a63:6a81:: with SMTP id f123mr16010885pgc.348.1569692207306; Sat, 28 Sep 2019 10:36:47 -0700 (PDT) Received: from jdavis.lan (c-71-204-186-7.hsd1.ca.comcast.net. [71.204.186.7]) by smtp.gmail.com with ESMTPSA id i7sm8142942pjs.1.2019.09.28.10.36.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Sep 2019 10:36:46 -0700 (PDT) Message-ID: <4315675a0ea69af857d282f35072254ee73c61d6.camel@j-davis.com> Subject: Re: max_parallel_workers question From: Jeff Davis To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Date: Sat, 28 Sep 2019 10:36:45 -0700 In-Reply-To: References: 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 On Sat, 2019-09-28 at 00:10 -0400, Robert Haas wrote: > I intended it to mean "the entire cluster." Basically, how many > workers out of max_worker_processes are you willing to use for > parallel query, as opposed to other things. I agree that PGC_USERSET > doesn't make any sense. In that case, PGC_SIGHUP seems most appropriate. It also might make more sense to rename it to reserved_worker_processes and invert the meaning. To me, that would be more clear that it's designed to prevent parallel query from interfering with other uses of worker processes. Another option would be to make it two pools, one for parallel workers and one for everything else, and each one would be controlled by a PGC_POSTMASTER setting. But it seems like some thought went into trying to share the pool of workers[1], so I assume there was a good reason you wanted to do that. Regards, Jeff Davis [1] If I'm reading correctly, it uses both lock-free code and intentional overflow.