Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMluG-0001eD-Vr for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Sep 2013 21:37:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VMluG-0006d1-Cb for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Sep 2013 21:37:00 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMluE-0006cs-EX for pgsql-hackers@postgresql.org; Thu, 19 Sep 2013 21:36:58 +0000 Received: from nm26-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.74]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMluB-0003De-9E for pgsql-hackers@postgresql.org; Thu, 19 Sep 2013 21:36:57 +0000 Received: from [98.139.214.32] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 19 Sep 2013 21:36:54 -0000 Received: from [98.139.212.227] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 19 Sep 2013 21:36:54 -0000 Received: from [127.0.0.1] by omp1036.mail.bf1.yahoo.com with NNFMP; 19 Sep 2013 21:36:54 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 9589.6369.bm@omp1036.mail.bf1.yahoo.com Received: (qmail 3328 invoked by uid 60001); 19 Sep 2013 21:36:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1379626613; bh=Zb2JzX3OddseMKK2RrvDjKzMxWMDrVeypmPeTwutoCg=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=I3duqy57wOMitzfVfAtKKlpPhpJabT//6Kl3FZET6b28vOyLKjNHq9A0+OxNS2O6itTuGYD5rM4+uJa1QXw+gIR8I7xId15QKgvxBR5h+ycxPmCbjaxc192D3DIp9UArg4IFXJWuNDTn6/RPXyA5MWHeBEKVKoMtGo9gGMO5Z9Y= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=e/91xVyKwUv8RUd7k3qbMUf2dfgHxvHs4Ix4EaBvja7Lh0psqo5zEEVvorsDTvbAdMc3cL8zWUm4QSZKLt1R03s78Sq5eT5nSzlBLpN26FeICEZniQT4ZJHcijwDhlC3ZR3gjOqM6HiXMinls64pvSoZ/fJGGlMPOKzPKZHkTtY=; X-YMail-OSG: oby1zyEVM1mJdCZP19BrU_Wm9XAivfj9TSFikhm0Q0GXra1 tZJoijKzYJnA43T8JNRmceKT59oChvASXFvoSI532IExAknKrqiQHExxzBBc zrbKclibp4iCAnen_sQp0N.BA9VkWR2.zy0wgmqGRD9dkY6l6gu_gctqd2ge MoL8AdwITQ75BGOva8WBY9zH3WsnOQ3RmGO9Smej40oAAJTJ_.CP8_g6ossO 1VS0QPIA5gDbMj082G_q2_Ms.qfCQRj2I0AbT9rfWctjSXifBOBUgHZPC7kE BdixzZTFtJ2gIvC1Amj6UX5iXT4UxleYJ1_VhXSB1wwLx6u9aYPQU.a1tRs3 ._FRtvghbV6Q_fOlSR.rQG3eAjGNGqvajMPXZhUVj0OoZi0th1ts53Nzwk8k s5OjMSeUZdVkKEqnRpTDqdWPCtj1H_v0jxthmCKv36Cap4VSDDG.XKcPg_Ff bMbJELW9gb_dgKMGWmQ8gWBES31oZZ_Bs1n6uBIoLwO46mHJzolN.FWzGu1V 2r2_L0tZT8pE.TqP2VBMBJXjRRwzD2G3zMoWmKq11h1yuwzBl_RrBAD20zPO Abw897hG1uCCEABGLtem1iySwiaOEASAG.yix3FJHZOSS9cl7XoFsVVmVESg XF18- Received: from [99.62.235.187] by web162901.mail.bf1.yahoo.com via HTTP; Thu, 19 Sep 2013 14:36:53 PDT X-Rocket-MIMEInfo: 002.001, Um9iZXJ0IEhhYXMgPHJvYmVydG1oYWFzQGdtYWlsLmNvbT4gd3JvdGU6Cgo.IFJpZ2h0IG5vdywgd2hldGhlciBvciBub3QgdG8gYXV0b3ZhY3V1bSBpcyB0aGUgcmVzdCBvZiBhIHR3by1wcm9uZ2VkCgo.IHRlc3QuwqAgVGhlIGZpcnN0IHByb25nIGlzIGJhc2VkIG9uIG51bWJlciBvZiB1cGRhdGVzIGFuZCBkZWxldGVzCj4gcmVsYXRpdmUgdG8gdGFibGUgc2l6ZTsgdGhhdCB0cmlnZ2VycyBhIHJlZ3VsYXIgYXV0b3ZhY3V1bS7CoCBUaGUKPiBzZWNvbmQgcHJvbmcgaXMgYmFzZWQgb24gYWdlKHJlbGZyb3oBMAEBAQE- X-Mailer: YahooMailWebService/0.8.157.561 References: <20130906052236.GF6067@eldon.alvh.no-ip.org> <20130906130854.GB600952@alap2.anarazel.de> <20130906163056.GA13158@momjian.us> <20130906163647.GA626072@alap2.anarazel.de> <20130906170159.GB13158@momjian.us> <20130906191330.GA13193@momjian.us> <20130906222623.GC626072@alap2.anarazel.de> <20130907002908.GA12753@momjian.us> <20130907053449.GE626072@alap2.anarazel.de> <5238854F.5040708@nasby.net> <20130917231050.GD29545@awork2.anarazel.de> Message-ID: <1379626613.94647.YahooMailNeo@web162901.mail.bf1.yahoo.com> Date: Thu, 19 Sep 2013 14:36:53 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: [PERFORM] encouraging index-only scans To: Robert Haas , Andres Freund Cc: Jim Nasby , Bruce Momjian , Alvaro Herrera , Peter Geoghegan , Tom Lane , Andrew Dunstan , PostgreSQL-development In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.1 (/) 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 Robert Haas wrote: > Right now, whether or not to autovacuum is the rest of a two-pronged > test.=A0 The first prong is based on number of updates and deletes > relative to table size; that triggers a regular autovacuum.=A0 The > second prong is based on age(relfrozenxid) and triggers a > non-page-skipping vacuum (colloquially, an anti-wraparound vacuum). >=20 > The typical case in which this doesn't work out well is when the table > has a lot of inserts but few or no updates and deletes.=A0 So I propose > that we change the first prong to count inserts as well as updates and > deletes when deciding whether it needs to vacuum the table.=A0 We > already use that calculation to decide whether to auto-analyze, so it > wouldn't be very novel.=A0 We know that the work of marking pages > all-visible will need to be done at some point, and doing it sooner > will result in doing it in smaller batches, which seems generally > good. >=20 > However, I do have one concern: it might lead to excessive > index-vacuuming.=A0 Right now, we skip the index vac step only if there > ZERO dead tuples are found during the heap scan.=A0 Even one dead tuple > (or line pointer) will cause an index vac cycle, which may easily be > excessive.=A0 So I further propose that we introduce a threshold for > index-vac; so that we only do index vac cycle if the number of dead > tuples exceeds, say 0.1% of the table size. +1=A0 I've been thinking of suggesting something along the same lines, for the same reasons. =A0 --=20 Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers