Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egEzP-0000eP-Bo for pgsql-general@arkaria.postgresql.org; Mon, 29 Jan 2018 19:21:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egEzN-00068b-Uk for pgsql-general@arkaria.postgresql.org; Mon, 29 Jan 2018 19:21:09 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1egEzN-00068R-KK for pgsql-general@lists.postgresql.org; Mon, 29 Jan 2018 19:21:09 +0000 Received: from mail-yb0-x242.google.com ([2607:f8b0:4002:c09::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1egEzK-0002NL-7m for pgsql-general@postgresql.org; Mon, 29 Jan 2018 19:21:08 +0000 Received: by mail-yb0-x242.google.com with SMTP id 65so3226237ybz.6 for ; Mon, 29 Jan 2018 11:21:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=1ScnuFjdnuO3snI8N7v42yPtZjAwQ8CoaxvBNO9W2Pk=; b=Vxgo6DL3tYA0MbUVvkgSjY8cPDiYRVOZA4fFZXcp9mYAa6etcx5bX+pU5v8yZDomVH PShF5v3kdCgQez3Us8XLjB3OXFcrudUF/MOXJKJA1xVdcWaGjX5xsccPj5fL2fEG85hQ ig15ZltcF343LdSGmGfIv+uFq239RJkGNc4rPQXyJZPDSCXIWU2XY84ydT31xi4mXzy3 wSCjN/P1t+tYs91ZWVSA4bSEd4Q8Wh6JEJtTbrklB0lCxZKBZiJV8Vlxy52SBmYHRAlQ J/0HLHL4OifvHfeb2Tv08TPuYxnyonJyhJq5ezVuhjtwxPey/4FRQ7zc6y4+ZJdSBMzG ZJcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=1ScnuFjdnuO3snI8N7v42yPtZjAwQ8CoaxvBNO9W2Pk=; b=M+f1GzmVFmPOI05aBR7TEx7fIZHgseqJsPIsAc9bwQ0EVdNlj/TgMESbaQgyEO29gh YrXY3yPS37QLq7bxrbHqx4cautipO7qL9Tu795Eyx84UHVMxZNWAf90P2vaiHe4akeJG taRbPiSP4eguOx0GaeLSciqfIeal5SM3qez3r0eB8Me73IurofTAQNUnNC3EogIsAE9x IRKVZb4XF3l7jlkrBVM7wfXdrCnvCXpTgPujhASONEhNgTJ2yuglVCwpuzgBAJhVfBww 0+xnB4fgoo5f97KI0LOCSmLeLOcftLAL7U0RpcSAKyWoBSbNdNcsr1jMlvvNok3o6AKr RLsg== X-Gm-Message-State: AKwxytdRUIUxhU1VW6S8gP5NSMZZO6pvju3XsPsA8/bCkr0MbKAh6smE 9S5l6osHyev8hcdIdZgHmbsvB4Jy X-Google-Smtp-Source: AH8x226ZDFFQJqqnzOyDGmbqt+xvL+hR7l4Lxezruike4i2QdiDoMK2Du/adobT7Ol5F0NuTyAi+8A== X-Received: by 10.37.29.9 with SMTP id d9mr7121867ybd.57.1517253663640; Mon, 29 Jan 2018 11:21:03 -0800 (PST) Received: from [192.168.1.183] ([193.93.78.27]) by smtp.gmail.com with ESMTPSA id f125sm4710178ywf.35.2018.01.29.11.21.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jan 2018 11:21:03 -0800 (PST) Subject: Re: EXPLAIN BUFFERS: dirtied To: Tom Lane Cc: pgsql-general@postgresql.org References: <21a14f5f-b39c-3aa8-da2c-2112ee328b93@gmail.com> <6040.1517251115@sss.pgh.pa.us> From: Vitaliy Garnashevich Message-ID: Date: Mon, 29 Jan 2018 21:21:00 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <6040.1517251115@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I've read this article: https://wiki.postgresql.org/wiki/Hint_Bits It says: > A plain SELECT, count(*), or VACUUM on the entire table will check > every tuple for visibility and set its hint bits. Suppose, a new page was created using many INSERTs, and then was written to disk during a checkpoint. There were no SELECTs or VACUUM on the page or table yet. Will the following SELECT of one tuple from the page update hint bits for ALL tuples on the page? Is that correct? When a page is initially created and then is being written to disk during a checkpoint, does checkpoint writer update the hint bits before writing the page, or the following SELECT/VACUUM will have to do that (possibly loading/updating/writing the page again)? Regards, Vitaliy On 2018-01-29 20:38, Tom Lane wrote: > Vitaliy Garnashevich writes: >> But what is "dirtied" statistics? When a SELECT query could make pages >> dirty? > Setting hint bits on recently-committed rows. > > regards, tom lane >