Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvrxP-000192-Df for pgsql-general@arkaria.postgresql.org; Fri, 31 Aug 2018 22:31:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fvrxM-0002r4-NV for pgsql-general@arkaria.postgresql.org; Fri, 31 Aug 2018 22:31:56 +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.89) (envelope-from ) id 1fvrxM-0002qq-7g for pgsql-general@lists.postgresql.org; Fri, 31 Aug 2018 22:31:56 +0000 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fvrxI-0006Ju-Mh for pgsql-general@postgresql.org; Fri, 31 Aug 2018 22:31:54 +0000 Received: by mail-qt0-x244.google.com with SMTP id d4-v6so16246013qtn.13 for ; Fri, 31 Aug 2018 15:31:52 -0700 (PDT) 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=ZoUmCsDbPKUYGxESxLXrvNfkRD4ZFReQuy5lvbQdrhk=; b=wKVD5P6iVpt3zbHQXnxtBmZ3EGGLv5Y1mu3oxEw2sqa65IcmIxURKAMw8IHuwRWTRx a+10sRl5eez4DBgB4VV4EKmN4cM+gcbhB7xf7h5fe2b208WAwseNEvly6poApMmcJJSU DtyvFxYgOcIznx553YUHRQJzqKWyTV+cItWzOUBvzVCqRpy3cxH6y/0IszH/Um6+1rxN 5PQCob2rqDgKIqHsk8BUGT4Sl0pD6Zv6ONumbarUkZkzL7y6lQn5bFBYCQVRwzBvTdZ1 lz+n8E/kaSRrcdUzjFGfok2xBafEQkgmIl9iiOfcg+D44BdVUoPVLVX1+UEs8ZLcD7sj 09QA== 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=ZoUmCsDbPKUYGxESxLXrvNfkRD4ZFReQuy5lvbQdrhk=; b=bh/qUMWK8a8J7Sh/qI5Elkq/z+deuC9YTsYpr2o05E+8hBr/qfB1egGU6R2wawc/sN /OU3zrCe2IjrpPIfwUSlF7wzIGzg02M7BK3cP7jAMO/HHto4UgzBfqxL/ol6tDdUrmr0 eQ7gdzC2BbnnDBNANhWG7imKPZYVpEHMeFznvYc7ej8pxFfHP6NEOuICOwoDcGIkp3b1 ZZ2CS5TB7blnZUcqZlqnTEG2HGfXRzA7w2wh8soyPUTDWwaPBfIbJqlchgYpG/BwKc1a 3igc+Jed0bY6jj+LN+clI8pakVLIMAIU5mrBgG1POnY3N2Tg/McSGDj6aQC1YMnQVezw ezBg== X-Gm-Message-State: APzg51DBAseNcfXCf5337V7uwDyYxBX+OpnYuKjvKS61LirALttMQRFZ IbL0tl7DA1F69+zW+P9gZMku1w== X-Google-Smtp-Source: ANB0VdbGmWJNlozVQbcMqCtu1d5jusV1ReAXVH2p+gnj/Qne+1gsgH4sR21tG10XEV9WOrRgtNWnRw== X-Received: by 2002:ac8:73d9:: with SMTP id v25-v6mr3695460qtp.4.1535754711645; Fri, 31 Aug 2018 15:31:51 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id q18-v6sm5814339qtk.57.2018.08.31.15.31.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 Aug 2018 15:31:50 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id EA7F26EE; Fri, 31 Aug 2018 19:31:47 -0300 (-03) Date: Fri, 31 Aug 2018 19:31:47 -0300 From: Alvaro Herrera To: David Pacheco Cc: pgsql-general@postgresql.org Subject: Re: Autovacuum degrades all other operations by keeping all buffers dirty? Message-ID: <20180831223147.f6papgxo7bb3xajd@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: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Aug-31, David Pacheco wrote: > From reading the 9.6.3 source, it looks like the autovacuum process > itself is single-threaded, and it reads pages essentially linearly > from the relation (possibly skipping some). When the autovacuum > process needs to modify a page, it doesn't write it directly, but > rather marks the buffer dirty. The page will be written later, Unless there's some bug, there is a BufferAccessStrategy that only lets a few dozen buffers go unwritten before the autovac worker process itself is forced to write some. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services