Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCX5b-0001YI-Pd for pgsql-docs@arkaria.postgresql.org; Mon, 13 Jun 2016 18:59:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bCX5b-0004Ay-4a for pgsql-docs@arkaria.postgresql.org; Mon, 13 Jun 2016 18:59:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bCX5E-0003mb-Ph for pgsql-docs@postgresql.org; Mon, 13 Jun 2016 18:59:36 +0000 Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bCX5B-0000NU-En for pgsql-docs@postgresql.org; Mon, 13 Jun 2016 18:59:35 +0000 Received: by mail-oi0-x22c.google.com with SMTP id d132so118524350oig.1 for ; Mon, 13 Jun 2016 11:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AwEkx/jWsRPD/7WlDOLmhNQ7q+fWlK7rE6sgsURmDsQ=; b=qbr0DrOSzv5iRBidE1MvaJf5ZzOnsZp1jv13sGC9bqlZI/O01N4qdOa/nQNOLfGEvt Puh+ZeHfBoYur/ZQB/JHJAM0Rzya974pngs/elssQZD2FEmarKTtxdHPgiGMg+Gveb+4 Hd0iz7IiDoeNQyWKhmYap8sWdIzVa0zBS3tzex6pvNkV5Z9SZQa5qWdcxAYZxmkOoFHa SMGSbaDD4S3DdTnJ96zWttICheg2h+ukxasesEMmRc4gO/QSFvgChn1BEE8YOp9fXojK PYHPfXWioVpZ5onF+9fYm8afT2S2Rb59vI0WQ+iwyhKxZzcJ1iRWv+p7LsUrkgSh78Jz 4Aeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AwEkx/jWsRPD/7WlDOLmhNQ7q+fWlK7rE6sgsURmDsQ=; b=QJihysydQ7LQA0KIOVdV0Q3UshGjdx8VNYreUnWVTGUG4gFAgTcmkgCX2a0B+9UPQx fNw8Z8JHgADRAeUKdDkT2SBej7v37ZHhqH/jCEplYg3OWN3SRqnG3aAxB8YyWBbgXbkg W0MxPDdNsTE64ClBXGqH/1VOSKQZda+cE5MoEnRRTK8zO3iCJegP/NPUmZ2JKQMxjVlw rnaB4+G6mrXaJGXcPZCbVL7LGEjRJCm8NLFW9/mFIs2aFLufRBod3lite5LMleHbPXEx mkYo2evduhdjXzeCm4ZAVzDJVkgL3c7fgT6H4bUCW2xc/NIo1GucyjWeLaLfcn91zSxq 1Vuw== X-Gm-Message-State: ALyK8tJOFO9u+NvfigsuyhFNtmP19GYRnZSl9/acgZPcDbIMsT4HL2JsMyoL2ZRz3Y1iMk3VmkZfb6fgInK6Fw== X-Received: by 10.202.45.78 with SMTP id t75mr7205351oit.89.1465844372358; Mon, 13 Jun 2016 11:59:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.168.105 with HTTP; Mon, 13 Jun 2016 11:59:31 -0700 (PDT) In-Reply-To: <20160613070056.5789.33953@wrigleys.postgresql.org> References: <20160613070056.5789.33953@wrigleys.postgresql.org> From: Kevin Grittner Date: Mon, 13 Jun 2016 13:59:31 -0500 Message-ID: Subject: Re: Regarding Overcommit To: jobinau@gmail.com Cc: "pgsql-docs@postgresql.org" Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Mon, Jun 13, 2016 at 2:00 AM, wrote: > Documentation says: > > sysctl -w vm.overcommit_memory=2 > > "it will lower the chances significantly and will therefore lead to more > robust system behavior." > > This statement in documentation is Wrong. > > This is not recommended for production environments, because if an > out-of-memory condition does present itself, there could be unexpected > behavior. It is wrong for some types of production environments, but for a server where the only (or primary) service is PostgreSQL it is absolutely Right. Without this, an out-of-memory condition which cancels any database process causes a crash and restart of all connections without necessarily giving any useful clues as to the cause of the crash. With vm.overcommit_memory = 2 it will generally yield an error on only the one connection causing the problem, and provide a detailed dump of memory contexts (with allocated space in each). Other connections are generally unaffected and the cause of the problem can be fixed to prevent recurrence. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs