Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtEI9-0002Ar-IL for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jan 2013 09:19:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TtEI8-0002PH-Fs for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jan 2013 09:19:16 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtEI7-0002PB-9f for pgsql-hackers@postgresql.org; Thu, 10 Jan 2013 09:19:15 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtEI4-0004di-OH for pgsql-hackers@postgresql.org; Thu, 10 Jan 2013 09:19:14 +0000 Received: from 172.24.2.119 (EHLO szxeml212-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id AVR80264; Thu, 10 Jan 2013 17:18:13 +0800 (CST) Received: from SZXEML412-HUB.china.huawei.com (10.82.67.91) by szxeml212-edg.china.huawei.com (172.24.2.181) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 10 Jan 2013 17:18:12 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml412-hub.china.huawei.com (10.82.67.91) with Microsoft SMTP Server id 14.1.323.3; Thu, 10 Jan 2013 17:18:08 +0800 From: Amit Kapila To: "'Pavan Deolasee'" , "'Bruce Momjian'" CC: "'Josh Berkus'" , References: <20130109230731.GA30885@momjian.us> <50EE0D8C.3080602@agliodbs.com> <50ee5d46.06dd0e0a.440f.2a45SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: Subject: Re: 9.2.1 & index-only scans : abnormal heap fetches after VACUUM FULL Date: Thu, 10 Jan 2013 14:48:05 +0530 Message-ID: <006a01cdef13$66aaa950$33fffbf0$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac3u/C0idKweIA+aRA+GCtHapI8x8QAFtSMw Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Thursday, January 10, 2013 12:01 PM Pavan Deolasee wrote: > On Thu, Jan 10, 2013 at 11:45 AM, Amit Kapila > wrote: > > On Thursday, January 10, 2013 6:09 AM Josh Berkus wrote: > > >> > >> Surely VACUUM FULL should rebuild the visibility map, and make > tuples > >> in > >> the new relation all-visible, no? > > > > I think it cannot made all visible. > > How about if any transaction in SSI mode is started before Vacuum > Full, should it see all tuples. > > > > We can definitely do better than what we are doing today and that > should fix many use cases and rebuild the VM for large part of the > table if not all. More precisely, in cluster.c we can see what does > HeapTupleSatisfiesVacuum() returns for every tuple in a page. If there > are only DEAD or LIVE tuples in a page, we can set the VM bit. We may > need similar additional checks for LIVE tuples like we have in vacuum > code path. But its certainly doable. >> Do we document this behavior or add a TODO item? > Both? IMO, we should do both. With Regards, Amit Kapila. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers