Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 70D651337B83 for ; Tue, 5 Apr 2011 13:58:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 54987-01-2 for ; Tue, 5 Apr 2011 16:57:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mail.postgresql.org (Postfix) with ESMTP id 2C9CF1337B43 for ; Tue, 5 Apr 2011 13:57:56 -0300 (ADT) Received: by wwk4 with SMTP id 4so2977564wwk.1 for ; Tue, 05 Apr 2011 09:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=oNEKGHNQ+EbKBbyEsKDoqenabJf+wWuazMHwCwiPQCQ=; b=vxAOcPYt6gs3qcrJUu+Yq//2gGcT++ZUL2rmdx495FqGtx94SdhrlWYPMJtZS6zjYu BBTjToa7AyHpPneqjdNIaXOWMpB2LuxIZlxNbfalM04yAq7BRN381Q94RMhzWzIo8dOY xIcBPSYi24sdQQPNVbJjFzhu9R+nogU7L5tjM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qQco66Cjp6VYbTO5KyPk066cfZLbrZ2wpBrVmR00dtBVc6DIhjCmYuv/rtNZYNJAuz L6IasVO/skgB5EJph1bRTNOsTtfm4DicCPbRvQTsT0w5jYKgafRZ5UcDjSdRSsba4HQ5 uSAhti1EKFPXGIFtEuhXr96LgOs5KFESOPSM0= MIME-Version: 1.0 Received: by 10.216.24.73 with SMTP id w51mr5244804wew.72.1302022675899; Tue, 05 Apr 2011 09:57:55 -0700 (PDT) Received: by 10.216.120.135 with HTTP; Tue, 5 Apr 2011 09:57:55 -0700 (PDT) In-Reply-To: <4D877738.7000609@citrin.ru> References: <4D877738.7000609@citrin.ru> Date: Tue, 5 Apr 2011 12:57:55 -0400 Message-ID: Subject: Re: number of semaphores and semaphore sets From: Robert Haas To: Anton Yuzhaninov Cc: pgsql-docs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.372 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FSL_RU_URL=2.271 X-Spam-Level: X-Archive-Number: 201104/38 X-Sequence-Number: 6609 On Mon, Mar 21, 2011 at 12:05 PM, Anton Yuzhaninov wrote: > This page: > http://www.postgresql.org/docs/9.0/interactive/kernel-resources.html > > has formula: > ceil((max_connections + autovacuum_max_workers) / 16) > > for number of semaphore sets (identifiers). > > It seems to be wrong (outdated). > > Correct formula seems to be > > ceil((max_connections + autovacuum_max_workers + 4) / 16) > > Semaphore sets created in src/backend/storage/lmgr/proc.c: > 1. MaxConnections > 2. autovacuum_max_workers + 1 > 3. NUM_AUXILIARY_PROCS (currently 3) Yeah, I think you're right. It appears that nothing material has changed here since 8.3, so I'm inclined to back-patch this doc fix back that far. Barring objections, I'll go change this. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company