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 1h6YV7-00037p-PB for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2019 10:31:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6YV6-0006Se-Bv for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2019 10:31:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6YV6-0006SX-13 for pgsql-hackers@lists.postgresql.org; Wed, 20 Mar 2019 10:31:12 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6YUz-0001IJ-58 for pgsql-hackers@postgresql.org; Wed, 20 Mar 2019 10:31:10 +0000 Received: from Davids-MacBook.local (unknown [41.136.236.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 4FB125468B; Wed, 20 Mar 2019 10:31:01 +0000 (UTC) Subject: Re: Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits To: Pavan Deolasee Cc: Masahiko Sawada , pgsql-hackers , Jeff Janes , Simon Riggs References: From: David Steele Message-ID: Date: Wed, 20 Mar 2019 14:30:53 +0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Pavan, On 3/14/19 2:20 PM, Masahiko Sawada wrote: > On Thu, Mar 14, 2019 at 5:17 PM Pavan Deolasee wrote: >> >> Ok. I will run some tests. But please note that this patch is a bug fix to address the performance issue that is caused by having to rewrite the entire table when all-visible bit is set on the page during first vacuum. So while we may do some more work during COPY FREEZE, we're saving a lot of page writes during next vacuum. Also, since the scan that we are doing in this patch is done on a page that should be in the buffer cache, we will pay a bit in terms of CPU cost, but not anything in terms of IO cost. > > Agreed. I had been misunderstanding this patch. The page scan during > COPY FREEZE is necessary and it's very cheaper than doing in the first > vacuum. I have removed Ibrar as a reviewer since there has been no review from them in three weeks, and too encourage others to have a look. Regards, -- -David david@pgmasters.net