Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1B5D21337BC3 for ; Sat, 22 Jan 2011 22:25:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 75478-01-3 for ; Sun, 23 Jan 2011 02:24:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A43FD1337BD9 for ; Sat, 22 Jan 2011 22:24:52 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p0N2OnfH000509; Sat, 22 Jan 2011 21:24:49 -0500 (EST) To: Robert Haas cc: Greg Smith , Fujii Masao , Magnus Hagander , pgsql-hackers@postgresql.org Subject: Re: auto-sizing wal_buffers In-reply-to: References: <20767.1294964709@sss.pgh.pa.us> <4D314406.3000703@2ndquadrant.com> <4D31D0E4.9000108@2ndquadrant.com> <11561.1295742146@sss.pgh.pa.us> <29279.1295746434@sss.pgh.pa.us> <202.1295748502@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Sat, 22 Jan 2011 21:13:07 -0500" Date: Sat, 22 Jan 2011 21:24:48 -0500 Message-ID: <508.1295749488@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/2204 X-Sequence-Number: 180041 Robert Haas writes: > I'm going with hacks. Any API that requires you to print to a string > so you can turn around and immediately convert it back to an integer > is not too swift. Oh, you're complaining about SetConfigOption, not the assign hooks. Not sure if it's really worth refactoring that. The problem is that there are lots and lots and lots of places that need to call that *without* any dependency on what the datatype of the target GUC option really is. There are a small number where we do know the type and conversion to a string is just overhead. If any of those were performance-critical it might be worth worrying about, but this one certainly isn't. regards, tom lane