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 1hALn1-0005uM-8x for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Mar 2019 21:45:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hALmy-0000dA-Ps for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Mar 2019 21:45:20 +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 1hALmw-0000d3-Sf for pgsql-hackers@lists.postgresql.org; Sat, 30 Mar 2019 21:45:20 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hALms-0000yM-Id for pgsql-hackers@lists.postgresql.org; Sat, 30 Mar 2019 21:45:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7E63D21165; Sat, 30 Mar 2019 17:45:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 30 Mar 2019 17:45:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s=fm1; bh=HsJbXXw8s3F/2u2ieE+kKAhVz75MV9t5BFoEkRHdjMM=; b=3RNWJzpz7Ctk /xMs6x+YyMBiRaYCqqsBPOi/mtX3r6yliVVwhWgA/jVA/StJLzZNgfETiFjNY0yT W9jk1Wa9gY5bvKX5L6QICG4K1DhcWIs8fdn0toi7H/z5g0KdoTZOp+WWtdDeu6cg shq48KcvddsSjWATKh+3T3P9dbEVl3p0C7swhMFL1sNB7WXzRZZZqEVZoXVi2ChD 6F5KoOzx5Iof/dwUcW3Jw2osXffjGPujoRZ4hB55ivxNH9BZaa0UFbj2i7C1Ch0h fqK+0uAYC7L2Bx4GM9WqBpZGFj5DG3Y2aQFkW3Y7KA36uckNLkgQ8V+ziaxdcw/+ AzCyHBXT2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=HsJbXXw8s3F/2u2ieE+kKAhVz75MV9t5BFoEkRHdj MM=; b=Win+hp/sKsYjGgrdpwa1xI+Yx0aMDjDz1sOjapuVFDOvA+elYjFh3s0r0 rxL+3hlMeiVjD//VkqC5ZKfxUuB1SKvsZr+qabnvU0qi6HGCqGs6bbHg78fixTww nLkpgiUKLrm0oMmxOQheWutg4VC0cZw9Wff2vU2azI7ZAjNQrXKbpyTopexMbHee IrjEjNxzeTIKFajiuB9m2yEophJuSlEU8MuSAQy1XrT3RSHiJdR+fBqdnyegMls6 kn5/Y1CBdKqI8+U+ju6sAQDrihZAd+ZOiRESzOuCbeqQG1EhpQAW0ttbn+LXvZk7 zVoot/O6gJInlwqu4CAGrUanTDTBw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkeelgdduheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepffgfjghfgggtgffuvffhkfesthhqmhdttderjeenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppe dujedvrdehkedrudehhedruddvvdenucfrrghrrghmpehmrghilhhfrhhomheprghnughr vghssegrnhgrrhgriigvlhdruggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [IPv6:2607:fb90:5234:81d1:62ca:1bd5:509c:d2e2] (unknown [172.58.155.122]) by mail.messagingengine.com (Postfix) with ESMTPA id 7BC78E498E; Sat, 30 Mar 2019 17:45:11 -0400 (EDT) Date: Sat, 30 Mar 2019 17:45:05 -0400 User-Agent: K-9 Mail for Android In-Reply-To: References: <20190328122847.ci7nmnook2dlbbqv@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: pgsql: Compute XID horizon for page level index vacuum on primary. To: Thomas Munro ,Peter Geoghegan CC: Robert Haas ,PostgreSQL Hackers From: Andres Freund Message-ID: <9AE2E8AF-8968-4774-8D6E-4D0A3B4FC19D@anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On March 30, 2019 5:33:12 PM EDT, Thomas Munro wrote: >On Sun, Mar 31, 2019 at 8:20 AM Peter Geoghegan wrote: >> On Sat, Mar 30, 2019 at 8:44 AM Robert Haas >wrote: >> > Overall I'm inclined to think that we're making the same mistake >here >> > that we did with work_mem, namely, assuming that you can control a >> > bunch of different prefetching behaviors with a single GUC and >things >> > will be OK=2E Let's just create a new GUC for this and default it to >10 >> > or something and go home=2E >> >> I agree=2E If you invent a new GUC, then everybody notices, and it >> usually has to be justified quite rigorously=2E There is a strong >> incentive to use an existing GUC, if only because the problem that >> this creates is harder to measure than the supposed problem that it >> avoids=2E This can perversely work against the goal of making the >system >> easy to use=2E Stretching the original definition of a GUC is bad=2E >> >> I take issue with the general assumption that not adding a GUC at >> least makes things easier for users=2E In reality, it depends entirely >> on the situation at hand=2E > >I'm not sure I understand why this is any different from the bitmap >heapscan case though, or in fact why we are adding 10 in this case=2E >In both cases we will soon be reading the referenced buffers, and it >makes sense to queue up prefetch requests for the blocks if they >aren't already in shared buffers=2E In both cases, the number of >prefetch requests we want to send to the OS is somehow linked to the >amount of IO requests we think the OS can handle concurrently at once >(since that's one factor determining how fast it drains them), but >it's not necessarily the same as that number, AFAICS=2E It's useful to >queue some number of prefetch requests even if you have no IO >concurrency at all (a single old school spindle), just because the OS >will chew on that queue in the background while we're also doing >stuff, which is probably what that "+ 10" is expressing=2E But that >seems to apply to bitmap heapscan too, doesn't it? The index page deletion code does work on behalf of multiple backends, bit= map scans don't=2E If your system is busy it makes sense to like resource u= sage of per backend work, but not really work on shared resources like page= reuse=2E A bit like work mem vs mwm=2E Andres --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E