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 1gvjJA-0002tU-D7 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Feb 2019 13:50:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvjJ9-0005F8-4h for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Feb 2019 13:50:07 +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 1gvjJ8-0005C6-SA for pgsql-hackers@lists.postgresql.org; Mon, 18 Feb 2019 13:50:06 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvjJ6-0001no-DS for pgsql-hackers@lists.postgresql.org; Mon, 18 Feb 2019 13:50:06 +0000 Received: by mail-qt1-x841.google.com with SMTP id z39so19247220qtz.0 for ; Mon, 18 Feb 2019 05:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=tOnMt+X2u45ysmkZUiOkhISgOFq8qY2kGpG5AD7vHNg=; b=bhFsEr5N+wptR+YRlW+snP1XLXcY+mUQzUNU4hKgItKwtIrLl3Spyj4W3oNKsJpit8 QctKJVez08DqS8xw1K0EiGZQkDfyDqpgaGAv6FWdQtQ1Y6ML/ESvVfl0ENMt9pjmQ6Hc 90Ka0xd0gg8CYOCnOehyMqzRvX2np0soy/x+vqmXQ+0UQWf48b/GynAPiZAxdhhacz0j NZtDLtOJfIifaWlXCiyMG0jjc4cLFtahhcigIo0JCe7gzPGbYyVoPLDj+vbK+8VvqqgW XgXi/ZzJa+0x4dNDffOPaQebU2XUDe46EF++v0g7lTFGeExxbeHpF6Fxrdb8Tetuu/a0 PUvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tOnMt+X2u45ysmkZUiOkhISgOFq8qY2kGpG5AD7vHNg=; b=H+CdAuOGMyZJ3oobCcwv1H7LxWf/v16gYYffwb9P+0WDheSRnYO4WC6BvS3cmBfV54 ST79EYY8viICreVdmzBFSTAqd5fy9Flms6LjSPNfZlQjEVtb6EenileIUqi4dzyCL0Qe ggye6CTtjFaJEpKL16JfTETc83ylzg4azC7W9t2lqVy6KKCInOKBBogRZSK5ZhuvjI0/ IXRKmF3UYBdG3nnXidBvTLjY42FwnDzeapChHJOaaS+6gp/Dcc6AnqFSiddhuen0+htd ZhzIqn5qY2Crs/afFRsTQo7/udRhHccLJup7zFSCwLvQS2GhAUjKh9bNxjUEsMNg49uh y6AQ== X-Gm-Message-State: AHQUAuas6YklTyj2cLTCpcgIqMCsXDTmDNDplWD+9MdlsMUfohT7ml/F k03fY7RTPtCyc443zWlEuq7HXg== X-Google-Smtp-Source: AHgI3IaqhE2JiVlVJLwHPyUXRi4YVBbt8Jtxt7BXGjodBpamKZZ1b5Qb6iiioEJXpFt5Kkqe92fVuA== X-Received: by 2002:ac8:32ef:: with SMTP id a44mr18666871qtb.334.1550497802804; Mon, 18 Feb 2019 05:50:02 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([186.11.95.81]) by smtp.gmail.com with ESMTPSA id k127sm7059869qkf.4.2019.02.18.05.50.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Feb 2019 05:50:01 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id BF0621245A9; Mon, 18 Feb 2019 10:49:56 -0300 (-03) Date: Mon, 18 Feb 2019 10:49:56 -0300 From: Alvaro Herrera To: Tomas Vondra Cc: Bruce Momjian , Andres Freund , Kyotaro HORIGUCHI , tsunakawa.takay@jp.fujitsu.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, ideriha.takeshi@jp.fujitsu.com, pgsql-hackers@lists.postgresql.org, michael.paquier@gmail.com, david@pgmasters.net, craig@2ndquadrant.com Subject: Re: Protect syscache from bloating with negative cache entries Message-ID: <20190218134956.GA909@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Feb-15, Tomas Vondra wrote: > ISTM there's a couple of ways to deal with that: > > 1) Ignore the memory amounts entirely, and do just time-base eviction. > > 2) If we want some size thresholds (e.g. to disable eviction for > backends with small caches etc.) use the number of entries instead. I > don't think that's particularly worse that specifying size in MB. Why is there a *need* for size-based eviction? Seems that time-based should be sufficient. Is the proposed approach to avoid eviction at all until the size threshold has been reached? I'm not sure I see the point of that. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services