Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7B7F4650EAB; Fri, 27 Jun 2008 11:36:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55061-03; Fri, 27 Jun 2008 11:35:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from oxford.xeocode.com (87-127-95-194.no-dns-yet.enta.net [87.127.95.194]) by postgresql.org (Postfix) with ESMTP id 01A78650EAA; Fri, 27 Jun 2008 11:36:04 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1KCF3S-0002e7-EX; Fri, 27 Jun 2008 15:36:02 +0100 To: "Simon Riggs" Cc: "Tom Lane" , "pgsql-hackers" , "List pgsql-patches" Subject: Re: [HACKERS] Hint Bits and Write I/O In-Reply-To: <1213797209.9468.126.camel@ebony.site> (Simon Riggs's message of "Wed\, 18 Jun 2008 14\:53\:29 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.patches" 5092) References: <1211916951.4489.232.camel@ebony.site> <15901.1211931165@sss.pgh.pa.us> <1213797209.9468.126.camel@ebony.site> From: Gregory Stark Organization: EnterpriseDB Date: Fri, 27 Jun 2008 15:36:02 +0100 Message-ID: <87hcbfq71p.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/193 X-Sequence-Number: 6679 "Simon Riggs" writes: > The default and minimum value for this parameter is 1, so very similar to > existing behaviour. Expected settings would be 2-5, possibly as high as 20, > though those are just educated guesses. So the maximum is set arbitrarily as > 100. Not a fan of arbitrary constants. ISTM this should just have a maximum of MaxHeapTuplesPerPage. I'm not really happy with having this parameter at all. It's not something a DBA can understand or have any hope of setting intelligently. I assume this is a temporary measure until we have a better understanding of what real-world factors affect the right values for this knob? > Temp buffers are never dirtied by hint bit setting. Most temp tables are > written in a single command, so that re-accessing clog for temp tuples > is seldom costly. This also changes current behaviour. I'm not sure I agree with this logic and it doesn't seem like temporary tables are an important enough case to start coming up with special cases which may help or may hurt. Most people use temporary tables the way you describe but I'm sure there's someone out there using temporary tables in a radically different fashion. I'm also a bit concerned that *how many hint bits* isn't enough information to determine how important it is to write out the page. What about how old the oldest transaction is which was hinted? Or how many *unhinted* xmin/xmax values were found? If HTSV can hint xmin for a tuple but finds xmax still in progress perhaps that's a good sign it's not worth dirtying the page? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!