<?xml version="1.0" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

<channel>
<title>Bruce Momjian: Postgres Blog</title>
<description>Bruce Momjian: Postgres Blog</description>
<link>http://momjian.us/main/blogs/pgblog.html</link>
<language>en-us</language>
<pubDate>Thu, 17 May 2012 10:45:01 EDT</pubDate>
<lastBuildDate>Thu, 17 May 2012 10:45:01 EDT</lastBuildDate>
<managingEditor>bruce@momjian.us (Bruce Momjian)</managingEditor>
<webMaster>bruce@momjian.us (Bruce Momjian)</webMaster>


<atom:link href="http://momjian.us/main/rss/pgblog.xml" rel="self" type="application/rss+xml" />

<item>
<title>
 Parallel Query Report from the PGCon Developer Meeting
</title>
<pubDate>Thu, 17 May 2012 10:45:01 -0400</pubDate>
<description>
&lt;p&gt;As part of yesterday's &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://wiki.postgresql.org/wiki/PgCon_2012_Developer_Meeting&quot;&gt;PGCon Developer Meeting&lt;/a&gt;, I hosted a discussion
about adding resource parallelism to Postgres, which I &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/blogs/pgblog/2011.html#December_5_2011&quot;&gt;blogged&lt;/a&gt; about
previously.  Josh Berkus has kindly &lt;a style=&quot;text-decoration: underline&quot; class=&quot;major&quot; href=&quot;http://wiki.postgresql.org/wiki/PgCon_2012_Developer_Meeting#Parallel_Query&quot;&gt;summarized&lt;/a&gt; the
results of that discussion.  I am hoping to help track and motivate progress in this area in the coming months;  it is a multi-year
project to complete.
&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_17_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_17_2012</guid>
<category>news</category>
</item>

<item>
<title>
 Template1 Me!
</title>
<pubDate>Wed, 16 May 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;You might have heard of the &lt;em&gt;template1&lt;/em&gt; database before, or seen it in the output of &lt;em&gt;pg_dumpall&lt;/em&gt;:
&lt;/p&gt;
&lt;p&gt;&lt;blockquote&gt;
&lt;/p&gt;&lt;pre class='quote_explicit'&gt;
REVOKE ALL ON DATABASE &lt;strong&gt;template1&lt;/strong&gt; FROM PUBLIC;
&amp;hellip;
&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_16_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_16_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_16_2012</guid>
<category>tip</category>
</item>

<item>
<title>
 Postgres 9.2 Draft Release Notes Published
</title>
<pubDate>Thu, 10 May 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;I have completed the Postgres 9.2 &lt;a style=&quot;text-decoration: underline&quot; class=&quot;major&quot; href=&quot;http://www.postgresql.org/docs/devel/static/release-9-2.html&quot;&gt;release notes&lt;/a&gt; I
&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_3_2012&quot;&gt;started&lt;/a&gt; seven days ago. Writing the release notes is always a taxing
experience.  I have to basically dedicate an entire week to the process of digesting 1100 commit messages to produce 3000 lines of SGML
text.  Once I am done though, it is rewarding to see the finished product.  It is like working on a painting all year, and spending a
frustrating week framing it and hanging it on the all &amp;mdash; once it is hung, you stand and admire it, and forget much of the sweat it took
to produce.  I am sure many community members feel the same.
&lt;/p&gt;
&lt;p&gt;Curious how the 9.2 release item count compares to previous major releases?  Here are the results:
&lt;/p&gt;
&lt;table border=&quot;1&quot; summary=&quot;&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Release&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Items&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;9.2&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;241&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;9.1&lt;/td&gt;&lt;td&gt;203&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;9.0&lt;/td&gt;&lt;td&gt;237&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;8.4&lt;/td&gt;&lt;td&gt;314&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;8.3&lt;/td&gt;&lt;td&gt;214&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;8.2&lt;/td&gt;&lt;td&gt;215&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;8.1&lt;/td&gt;&lt;td&gt;174&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;8.0&lt;/td&gt;&lt;td&gt;230&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;7.4&lt;/td&gt;&lt;td&gt;263&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_10_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_10_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_10_2012</guid>
<category>news</category>
</item>

<item>
<title>
 Postgres Drinking Game
</title>
<pubDate>Mon, 07 May 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;My children have traveled to many conferences with me, and have heard many webcasts and training calls at home.  I guess, after hearing
about Postgres so often, they pick up certain phrases of interest, and the big one for them is &quot;shared buffers&quot;.  Anytime someone uses
those words, they start howling and make up some funny sentence using the words. 
&lt;/p&gt;
&lt;p&gt;There are a variety of beer drinking &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://en.wikipedia.org/wiki/Drinking_game#Film&quot;&gt;games&lt;/a&gt; that trigger drinking when a
&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://www.realbeer.com/fun/games/movie.php&quot;&gt;word&lt;/a&gt; is said &amp;mdash; perhaps &quot;shared buffers&quot; is enough on its own to make a drinking game. 
&lt;img src=&quot;http://momjian.us/main/img/blog/wink.png&quot;&gt; 
&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_7_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_7_2012</guid>
<category>thoughts</category>
</item>

<item>
<title>
 The Effectiveness of effective_cache_size
</title>
<pubDate>Fri, 04 May 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;Having &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_2_2012&quot;&gt;reported&lt;/a&gt; the methods for finding the size of the kernel cache on
Linux, I wish to highlight the importance of the postgresql.conf setting
&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://www.postgresql.org/docs/9.1/static/runtime-config-query.html#RUNTIME-CONFIG-QUERY-CONSTANTS&quot;&gt;&lt;em&gt;effective_cache_size&lt;/em&gt;&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Unlike other memory settings that control how memory is allocated, effective_cache_size tells the optimizer how much cache is present in
the kernel.  This is important for determining how expensive large index scans will be.  The optimizer knows the size of
&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://www.postgresql.org/docs/9.1/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY&quot;&gt;shared_buffers&lt;/a&gt;, but not the
kernel cache size, which affects the probability of expensive disk access.
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_4_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_4_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_4_2012</guid>
<category>performance</category>
</item>

<item>
<title>
 Starting on 9.2 Release Notes
</title>
<pubDate>Thu, 03 May 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;As in previous years, I have started working on major release notes, this time for Postgres 9.2.  I start with this command:
&lt;/p&gt;
&lt;p&gt;&lt;blockquote&gt;
&lt;/p&gt;&lt;pre class='quote_explicit'&gt;
$ src/tools/git_changelog --since '2011-06-11 00:00:00 GMT' --master-only \
&amp;gt; --oldest-first --details-after
&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_3_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_3_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_3_2012</guid>
<category>news</category>
</item>

<item>
<title>
 Measuring Free Memory and Kernel Cache Size on Linux
</title>
<pubDate>Wed, 02 May 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;Measuring Linux free memory and kernel cache size can be somewhat tricky.  You might look at /proc/meminfo for the answer (commas
added):
&lt;/p&gt;
&lt;p&gt;&lt;blockquote&gt;
&lt;/p&gt;&lt;pre class='quote_explicit'&gt;
# cat /proc/meminfo
MemTotal:       24,736,604 kB
MemFree:         3,805,392 kB
Buffers:           743,016 kB
Cached:         18,188,208 kB
...
&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#May_2_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#May_2_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#May_2_2012</guid>
<category>performance</category>
</item>

<item>
<title>
 Caching Levels
</title>
<pubDate>Mon, 30 Apr 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;There are several levels of caching used in a typical server &amp;mdash; here they are, in order of increasing distance from the
&lt;span style=&quot;font-variant: small-caps&quot;&gt;cpu&lt;/span&gt;:
&lt;/p&gt;
&lt;table summary=&quot;&quot;&gt;
&lt;tr&gt;&lt;td&gt;1.&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;font-variant: small-caps&quot;&gt;Cpu&lt;/span&gt; cache
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2.&lt;/td&gt;&lt;td&gt;Random-Access Memory (&lt;span style=&quot;font-variant: small-caps&quot;&gt;ram&lt;/span&gt;)
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3.&lt;/td&gt;&lt;td&gt;Storage controller cache
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4.&lt;/td&gt;&lt;td&gt;Storage device (disk) cache
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;All of these are a fixed size and set at hardware installation time, i.e. you can't move cache from one level to another.  For Postgres,
there is flexibility in how #2, random-access memory, is allocated, and this provides a never-ending opportunity for administrators to
optimize their systems.  The three &lt;span style=&quot;font-variant: small-caps&quot;&gt;ram&lt;/span&gt; allocation possibilities are:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://www.postgresql.org/docs/9.1/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY&quot;&gt;shared_buffers&lt;/a&gt;
  &lt;/li&gt;&lt;li&gt;&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://www.postgresql.org/docs/9.1/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY&quot;&gt;work_mem&lt;/a&gt;
  &lt;/li&gt;&lt;li&gt;Kernel cache
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#April_30_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#April_30_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#April_30_2012</guid>
<category>performance</category>
</item>

<item>
<title>
 Upcoming Events
</title>
<pubDate>Sat, 28 Apr 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;During the next two months I will be attending events in the following cities:  New York City, Ottawa, Charlotte (North Carolina), and
Boston &amp;mdash; the details are on my &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/events/conferences/2012.html&quot;&gt;website&lt;/a&gt;.  I will also be doing training in many of
these locations.  And I spoke in &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/events/conferences/2012.html#April_26_2012&quot;&gt;Philadelphia&lt;/a&gt; this week &amp;mdash; I
guess this is what the &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/events/conferences/2012.html#April_26_2012&quot;&gt;New Postgres Era&lt;/a&gt; looks like. 
&lt;img src=&quot;http://momjian.us/main/img/blog/wink.png&quot;&gt;
&lt;/p&gt;
&lt;a href=&quot;http://momjian.us/main/comment_item.html?/main/blogs/pgblog.html/April_28_2012&quot;&gt;View or Post Comments&lt;/a&gt;&lt;br /&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#April_28_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#April_28_2012</guid>
<category>conference</category>
</item>

<item>
<title>
 Why Use Multiple Schemas?
</title>
<pubDate>Fri, 27 Apr 2012 12:00:00 -0400</pubDate>
<description>
&lt;p&gt;I &lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#April_23_2012&quot;&gt;mentioned&lt;/a&gt; that Postgres supports multiple clusters, databases, and
schemas, but an open question is why use multiple schemas, rather than placing everything in the &quot;public&quot; schema?  By default,
&lt;a style=&quot;text-decoration: none&quot; class=&quot;txt2html&quot; href=&quot;http://www.postgresql.org/docs/9.1/static/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-STATEMENT&quot;&gt;&lt;em&gt;search_path&lt;/em&gt;&lt;/a&gt; places everything
in the public schema (assuming a schema matching the current user name does not exist):
&lt;/p&gt;
&lt;p&gt;&lt;blockquote&gt;
&lt;/p&gt;&lt;pre class='quote_explicit'&gt;
test=&amp;gt; SHOW search_path;
  search_path
----------------
 &quot;$user&quot;,public
(1 row)
&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://momjian.us/main/blogs/pgblog/2012.html#April_27_2012&quot;&gt;Continue Reading &amp;raquo;&lt;/a&gt;&lt;/p&gt;
</description>
<link>http://momjian.us/main/blogs/pgblog/2012.html#April_27_2012</link>
<guid>http://momjian.us/main/blogs/pgblog/2012.html#April_27_2012</guid>
<category>tip</category>
</item>


</channel>

</rss>

