<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEAFQXk8eip7ImA9WhRXFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626</id><updated>2011-12-21T17:31:50.772-05:00</updated><category term="DataDirector" /><category term="postgresql" /><category term="VMware" /><category term="SunBlogs" /><title>Jignesh Shah's  Blog</title><subtitle type="html">Blog about technologies like PostgreSQL, vFabric Postgres (vPostgres), vFabric  Data Director, Open Source..</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://jkshah.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>168</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/JigneshShahsBlog" /><feedburner:info uri="jigneshshahsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0UNSXY7eip7ImA9WhRXFE8.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-65027497897812826</id><published>2011-12-20T17:46:00.001-05:00</published><updated>2011-12-20T17:48:18.802-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-20T17:48:18.802-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VMware" /><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><category scheme="http://www.blogger.com/atom/ns#" term="DataDirector" /><title>Using DVDStore with PostgreSQL</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
We now have support for PostgreSQL in the popular &lt;a href="http://en.community.dell.com/techcenter/extras/w/wiki/dvd-store.aspx"&gt;DVDStore Benchmark&lt;/a&gt; which stresses database using an emulated DVDStore e-Commerce website. DVDStore Benchmark is maintained by Dave Jaffe (Dell) and&amp;nbsp; &lt;a href="http://virtualtoddsbigblog.blogspot.com/"&gt;Todd Muirhead&lt;/a&gt; (VMware).&amp;nbsp; It is an open source database test kit. The beauty of the benchmark kit is it allows the same web application being deployed either as &lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Java/Tomcat&amp;nbsp; and connect to the database, &lt;/li&gt;
&lt;li&gt;Web Server/PHP and connect to the database, &lt;/li&gt;
&lt;li&gt;IIS/ASP.NET connect to the database or &lt;/li&gt;
&lt;li&gt;Direct connect to the database and invoking the business logic as stored procedures stored on the database itself. &lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Currently the PostgreSQL implementation&amp;nbsp;details&amp;nbsp;are as follows&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Java/Tomcat using PostgreSQL JDBC driver, &lt;/li&gt;
&lt;li&gt;Web Server/PHP&amp;nbsp; using &amp;nbsp;PHP-postgres&amp;nbsp;modules which uses&amp;nbsp; libpq&lt;/li&gt;
&lt;li&gt;Currently there is noIIS/ASP.NET web app&amp;nbsp; implementation for PostgreSQL&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Direct connect to PostgreSQL database and business logic implemented in stored procedures however the driver is implemented using .NET C# and requires Npgsql 2.0.11.0&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Setup instructions for the database are relatively quite easy.&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Download &lt;a href="http://linux.dell.com/dvdstore/ds21.tar.gz"&gt;ds21.tar.gz&lt;/a&gt;&amp;nbsp;&amp;nbsp;and also&amp;nbsp;&lt;a href="http://linux.dell.com/dvdstore/ds21_postgresql.tar.gz"&gt;ds21_postgresql.tar.gz&lt;/a&gt; from&amp;nbsp; &lt;a href="http://linux.dell.com/dvdstore/"&gt;http://linux.dell.com/dvdstore/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Unzip them on the system running PostgreSQL&lt;/li&gt;
&lt;li&gt;The default data size is 10MB. If you want a different size execute &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;'perl Install_DVDStore.pl'&lt;/span&gt; in the ds2 directory. (Expects perl to be available on the system. I used the option 100, MB , PGSQL, LINUX respectively for the options.)&lt;/li&gt;
&lt;li&gt;Assuming you are logged on as the DB Owner and the database is on the localhost at port 5432, execute the script &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;pgsql_create_all.sh&lt;/span&gt; in the ds2/pgsqlds2 directory. It will create a database "ds2", two users "ds2/ds2" and "web/web", create tables, load tables, create indexes, update sequences and finally run analyze. (The script needs to be modified slighly if the database is already hardened and you want to control the creation of database and the users.)&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Setup for the actual load&amp;nbsp;driver is probably easiest on&amp;nbsp; another Windows platform as follows as it was designed for .NET platform.&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Download and install Windows SDK v6.1 and .NET 3.5 framework&amp;nbsp; on a Windows Client machine. &lt;/li&gt;
&lt;li&gt;Once installed start the CMD prompt from &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;Programs-&amp;gt; Windows SDKv6.1-&amp;gt; CMD Prompt&lt;/span&gt;. &lt;/li&gt;
&lt;li&gt;Verify the above CMD prompt has path setup for gacutil in windows&amp;nbsp;(Try&amp;nbsp;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;'gacutil/l'&lt;/span&gt;)&lt;/li&gt;
&lt;li&gt;Download Npgsql 2.0.11 for msnet35 and install the dlls using the gacutil.exe (Note other versions of Npgsql&amp;nbsp;may&amp;nbsp;have issues.)&lt;/li&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;gacutil/i Npgsql.dll &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;gacutil/i Mono.security.dll &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;gacutil/i policy-2.0.Npgsql.dll&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
With the above setup you can use the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;ds2webdriver.exe&lt;/span&gt; in ds2/drivers or the direct &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;ds2pgsqldriver.exe&lt;/span&gt; in ds2/pgsqlds2. More on running the benchmark driver itself&amp;nbsp; in another post.&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-65027497897812826?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ina4pIdeS0SRo2trid25ARR3wx0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ina4pIdeS0SRo2trid25ARR3wx0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ina4pIdeS0SRo2trid25ARR3wx0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ina4pIdeS0SRo2trid25ARR3wx0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/skUk7PTm1ZY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/65027497897812826/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=65027497897812826" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/65027497897812826?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/65027497897812826?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/skUk7PTm1ZY/using-dvdstore-with-postgresql.html" title="Using DVDStore with PostgreSQL" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/12/using-dvdstore-with-postgresql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcEQ307fyp7ImA9WhdaFkU.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-5477524875381038808</id><published>2011-10-27T00:00:00.000-04:00</published><updated>2011-10-27T00:00:02.307-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-27T00:00:02.307-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><category scheme="http://www.blogger.com/atom/ns#" term="DataDirector" /><title>How does PostgreSQL HA works in vFabric Data Director?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Databases go down due to various reasons. Some reasons are known and some unknown.&lt;br /&gt;
Common reasons are hardware failure, software failure, database unresponsive, etc. What is considered as a failure is actually one of the tasks. Various DBA's use a simple select statement as a test to make sure that the database is up and working. But what does one do if that simple select statement fails. I remembers years ago I worked on a module which will start paging&amp;nbsp; engineers in a sequence (and eventually their managers if the engineers failed to respond back in a certain expected way).&amp;nbsp; In this email/text age, scripts will start sending out emails and text messages.&amp;nbsp; What we are is basically in the Event-&amp;gt;React-&amp;gt; Respond mode of operation.&lt;br /&gt;
&lt;br /&gt;
However true HA needs to lower downtime which can&amp;nbsp; only be done by having the mode of operation as Event-&amp;gt;Respond-&amp;gt;React. To explain that when such an event happens, do an automated response first and then React to wake the engineers up :-)&lt;br /&gt;
&lt;br /&gt;
How do you set this up in vFabric Data Director? This can be achieved by selecting the database properties, selecting the Database Configuration tab and set "High Availability" to "Enable". This is also refered as One-Click HA setting.&lt;br /&gt;
&lt;br /&gt;
Of course this assumes that your virtual Data Cluster is set properly for providing the high availability services. How do you set it up properly? Well you need atleast two ESXi Hosts so if one host fails, the other can cover for it. Also vSphere HA property has been enabled in the Virtual Data Center Cluster. Note these settings are all "required" for vFabric Database setup and a "supported" setup does mandate atleast two ESXi Hosts in order for HA to work.&lt;br /&gt;
&lt;br /&gt;
Now that we have gone over the setup requirements, lets go over the scenarios on how the application or user sees it.&amp;nbsp; A user is connected to the database using the connection string. Something happens and the database goes down and the connection drops. Chances are if you reconnect again immediately it may fail. However with certain time which is expected to be less than 5 minutes (which we call our Recovery Time Objective or RTO) &amp;nbsp;by default, if you try again you can connect to the database again. &lt;br /&gt;
&lt;br /&gt;
So what happens in the background? Well if it was Magic, we would not tell you. But it is not really magic though it feels like that. Here is what will typically happen in the background.&lt;br /&gt;
For some reason the PostgreSQL fails to respond anymore it could be a "hung" situation or the PostgreSQL server has died. There is a small heartbeat monitor which figures out the status of the database. If it notices that the hung situation or no DB server process, it will try to restart the database. If the database cannot be restarted (because the whole VM appliance cannot respond anymore), it will in novice terms kill the virtual machine. The vCenter Server which has its own heartbeat on the VM appliance will see that the Virtual Machine has died (irrespective of the Database Monitor which may not be working if the whole host dies), the vCenter Server will restart the VM appliance on another server.&lt;br /&gt;
&lt;br /&gt;
Since shared-storage is a requirement, the VM appliance will start on another host and it will feel like a reboot. Once the VM starts, the PostgreSQL server process will be restarted. At this point of time, the PostgreSQL server goes into recovery mode. The biggest question at this point of time typically is how long will the recovery mode take. Typically based on internal tests even with the heaviest workload on 8vCPU, the recovery time can finish within the checkpoint_timeout settings which means our Recovery Time Objective is guided by checkpoint_timeout + heartbeat latency + the time to restart the VM on another hosts.&amp;nbsp; Overall we try to fit that into our Recovery Time Objective of 5 minutes.&lt;br /&gt;
&lt;br /&gt;
Great the virtual machine has restarted and the database has done its recovery and working again. Now what? Well dont forget in this cloud setup, the easiest thing is to use DHCP addresses. Unfortunately DHCP addresses are not guaranteed to be same after reboot . Plus rebooting on a different host makes it more complex to get the same IP. This IP address change can cause the Database connectivity to be lost to the actual end user.&amp;nbsp;&amp;nbsp; In order to shield the end users from this complexity, we sort of implemented our own Database Name Server. However this can only work by modifying the clients which references the database using this "Virtual Hosts" format so that the clients can always find their intended database without really worrying about where it is running. A minor change in the PostgreSQL clients but a huge complexity reducer for end users to fix their IP addresses or domain names to the changed location.&lt;br /&gt;
&lt;br /&gt;
Aha now this explains why vPostgres ships their own clients and libpq library which is API compatible with standard PostgreSQL libpq library.The libpq library is actually 100% compatible with standard PostgreSQL Libpq library. The only addition it has is the feature of Virtual Hosts which is critical for HA to work seemlessly without the users being concerned about the actual IP of the database. Without the change, HA will not work on the framework. Since it is 100% compatible, if an application works standard libpq it will work with vPostgres libpq. Similar changes are also done in the JDBC driver and ODBC Driver for vPostgres so HA is supported across all supported clients.&lt;br /&gt;
&lt;br /&gt;
That said if you use standard libpq/psql and other standard clients&amp;nbsp;and you know the IP Address of the vPostgres database and connect to it via that IP address (and not the virtual host string) &amp;nbsp;it will still work flawlessly. However if the database goes down and restarts with a new IP address then the client will have no ability to figure out the new IP address and will have to bug the Administrator to figure out the new IP address. &lt;br /&gt;
&lt;br /&gt;
Though for folks familiar with vSphere terminology, HA is not FT - Fault Tolerant which is a different take on HA to further reduce downtime from minutes to seconds. More on that in future.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-5477524875381038808?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bo_2o0a7Yf7qxKmKHVsTcqS7ygI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bo_2o0a7Yf7qxKmKHVsTcqS7ygI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bo_2o0a7Yf7qxKmKHVsTcqS7ygI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bo_2o0a7Yf7qxKmKHVsTcqS7ygI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/M43QTGtIweA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/5477524875381038808/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=5477524875381038808" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5477524875381038808?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5477524875381038808?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/M43QTGtIweA/how-does-postgresql-ha-works-in-vfabric.html" title="How does PostgreSQL HA works in vFabric Data Director?" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/10/how-does-postgresql-ha-works-in-vfabric.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AAQng7fyp7ImA9WhdbFUw.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-6345323650030781827</id><published>2011-10-13T11:14:00.001-04:00</published><updated>2011-10-13T11:29:03.607-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-13T11:29:03.607-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Using PostgreSQL Server on Micro Cloud Foundry</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
With the recent news that &lt;a href="http://blog.cloudfoundry.com/post/11063041222/micro-cloud-foundry-tm-now-with-postgresql-and"&gt;PostgreSQL is now available in the Micro Cloud Foundry&lt;/a&gt;, I decided to take it for a test spin. I downloaded the &lt;a href="https://cloudfoundry.com/micro"&gt;Micro Cloud Foundry VM&lt;/a&gt; zip file which is about 1.0GB big. After downloading it I unzipped it on my MacBookPro and use VMware Fusion 4.0.2 to open the VM. As the VM booted up the console shows a message&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
Micro Cloud Foundry not configured&lt;/div&gt;
&lt;br /&gt;
I selected the option 1 to configure the Micro Cloud. It asked me to configure my VM user password, Networking (DHCP or Static) and then asked me to enter my Cloud Foundry configuration token which was provided to me after I had created a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;pgtest.cloudfoundry.me&lt;/span&gt; domain&amp;nbsp; just before the download.&lt;br /&gt;
&lt;br /&gt;
It took about 5 minutes to setup the cloud &lt;br /&gt;
&lt;br /&gt;
After the setup: I got my micro cloud foundry setup with my local IP (looked like a bridge connection rather than NAT).&lt;br /&gt;
&lt;br /&gt;
Then I installed the VMC tool on my Mac using&amp;nbsp; (Need Ruby)&lt;br /&gt;
(NOTE: Skip directly to ssh part if you donot want to install Ruby/vmc)&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ gem install vmc&lt;/div&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ vmc target http://api.pgtest.cloudfoundry.me&lt;/div&gt;
&lt;br /&gt;
Got me connected to my micro cloud.&lt;br /&gt;
Then I did a&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ vmc register&lt;/div&gt;
to create my user account using a email id and password&lt;br /&gt;
Then I logged into the MicroCloud using&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ vmc login&lt;/div&gt;
&lt;br /&gt;
Now when I do the following I see the PostgreSQL Service available with other databases also.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ vmc services&lt;br /&gt;
&lt;br /&gt;
============== System Services ==============&lt;br /&gt;
&lt;br /&gt;
+------------+---------+---------------------------------------+&lt;br /&gt;
| Service&amp;nbsp;&amp;nbsp;&amp;nbsp; | Version | Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;
+------------+---------+---------------------------------------+&lt;br /&gt;
| mongodb&amp;nbsp;&amp;nbsp;&amp;nbsp; | 1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | MongoDB NoSQL store&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;
| mysql&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | MySQL database service&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;
| postgresql | 9.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | PostgreSQL database service (vFabric) |&lt;br /&gt;
| rabbitmq&amp;nbsp;&amp;nbsp; | 2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | RabbitMQ messaging service&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;
| redis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Redis key-value store service&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;
+------------+---------+---------------------------------------+&lt;br /&gt;
&lt;br /&gt;
=========== Provisioned Services ============&lt;br /&gt;
&lt;/div&gt;
As you can see there are no provisioned services currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here if you are like a Java/Spring developer you want to creating an application using Xin Li's post on "&lt;a href="http://support.cloudfoundry.com/entries/20470268-postgresql-for-micro-cloud-foundry-spring-tutorial"&gt;PostgreSQL for Micro Cloud Foundry- Spring Tutorial&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
I am not interested in developing Java applications but I want access to the postgresql server directly.&lt;br /&gt;
&lt;br /&gt;
Now comes the ssh part. &lt;br /&gt;
&lt;br /&gt;
Currently the PostgreSQL server is not exposed externally from the Micro Cloud.&lt;br /&gt;
But on the console of Micro Cloud VM, you can configure the password of vcap user. Which means now you have ssh access to the Micro Cloud VM.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ ssh vcap@mircrocloudip&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ cd /var/vcap/store/postgresql&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ vi postgresql.conf&amp;nbsp;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
&lt;br /&gt;&lt;/div&gt;
and edit listen_address to add your database client ip address out there.&lt;br /&gt;
For my demo setup I just opened it to all&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
listen_addresses='*'&lt;/div&gt;
&lt;br /&gt;
Next assign a Postgres password for the "vcap" user&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
$ /var/vcap/packages/postgresql/bin/psql -d postgres&lt;br /&gt;
psql (9.0.4)&lt;br /&gt;
Type "help" for help.&lt;br /&gt;
&lt;br /&gt;
postgres=# ALTER USER vcap WITH PASSWORD 'secret';&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
ALTER ROLE&lt;/div&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
postgres=#\q&lt;/div&gt;
&lt;br /&gt;
Now I exit from Micro Cloud VM and using the console I restart the services.&lt;br /&gt;
Now the PostgreSQL service can be accessed from postgres client anywhere.&lt;br /&gt;
&lt;br /&gt;
For example from a Macbook Pro&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ psql -h microcloudip -d postgres -U vcap&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Password for user vcap: &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;psql (9.0.5, server 9.0.4)&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Type "help" for help.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;postgres=# &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try it out!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-6345323650030781827?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/goZ3ytiBpvVluWh-VidJlBCLb-E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/goZ3ytiBpvVluWh-VidJlBCLb-E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/goZ3ytiBpvVluWh-VidJlBCLb-E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/goZ3ytiBpvVluWh-VidJlBCLb-E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/FcNGkKHA8gM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/6345323650030781827/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=6345323650030781827" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6345323650030781827?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6345323650030781827?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/FcNGkKHA8gM/using-postgresql-server-on-micro-cloud.html" title="Using PostgreSQL Server on Micro Cloud Foundry" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/10/using-postgresql-server-on-micro-cloud.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8ERnc8cSp7ImA9WhdbEE8.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-4766006766399907518</id><published>2011-10-07T15:44:00.000-04:00</published><updated>2011-10-07T17:26:47.979-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-07T17:26:47.979-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DataDirector" /><title>vFabric Data Director - All in a Box setup</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
vFabric Data Director 1.0 is available for download on the &lt;a href="http://www.vmware.com/go/download-datadirector"&gt;VMware download website&lt;/a&gt;. Generally the question we get a lot is on how to do a "small" setup for either a departmental setup or trial setup which is actually small enough to fit in a beefy workstation or a small server. Often time this helps people to evaluate the features of Data Director before doing the "standard" HA setup. Maybe it is only for tests/dev databases where one does not want to invest too much in the infrastructure setup itself..&lt;br /&gt;
&lt;br /&gt;
So here is one such way of doing a "small" setup of vFabric Data Director for test/dev/qa databases.&lt;br /&gt;
(Note: This is going to be a long blog post)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What do you need?&lt;/b&gt;&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;A beefy Workstation or departmental Server with lots of RAM and lots of Storage and atleast two network adapter (Even though only one need be connected to the departmental network)&lt;/li&gt;
&lt;li&gt;ESXi V5.0 installation CD (Software)&lt;/li&gt;
&lt;li&gt;vCenter&amp;nbsp; Virtual Appliance/Virtual Machine &lt;/li&gt;
&lt;li&gt;DHCP Server Virtual Machine&lt;/li&gt;
&lt;li&gt;vFabric Data Director Virtual Appliance Image&lt;/li&gt;
&lt;li&gt;Preferably atleast one static IP Address on your departmental network for DB Name Server or have Dynamic DNS on your departmental network&lt;/li&gt;
&lt;li&gt;License Keys - Use your VMware contacts.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;b&gt;Step I: Preparing the Workstation &lt;/b&gt;&lt;br /&gt;
On my test setup I had 12GB of RAM with 2x Quad Core x86_64 chips with 5 disks in it. Since this is my whole setup, the more memory I get, the merrier I am with the setup. It is recommended that you have some sort of Raid controller on the setup and have ability to create multiple LUN devices that will be exposed to the ESXi server. On my setup I had about one disk dedicated to ESXi and for other disks I created a RAID-5 LUN (RAID-10 is preferred but I did not have enough space on my demo setup).&amp;nbsp; If I had more Storage available I would do two setups with RAID-10 setup and a RAID-0 setup which can be used as backup datastore. The RAID preferences depends on individual needs on what to trade off (performance , availability, capacity).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step II: Installing ESXi 5.0&amp;nbsp; &lt;/b&gt;&lt;br /&gt;
Using the ESXi V5.0 installation CD, I installed ESXi&amp;nbsp; on the first logical device and eventually setup the RAID protected device as a datastore that ESXi can use.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step III: Install vCenter Virtual Machine&lt;/b&gt;&lt;br /&gt;
Here one can use the vCenter Virtual Appliance available also. On my demo setup I had used a vCenter Server based on Windows Server 2003 since that was available. Installation of vCenter Server itself can be its own blog entry and I will leave that to experts. For my purpose I had setup vCenter Server setup done in a virtual machine.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step IV: Setting up vCenter Server for our task&lt;/b&gt;&lt;br /&gt;
This is where things are bit different for this special all in a box setup. The idea of setting up is to do vFabric Data Director Appliance which includes the hardware. Hence the idea is only the management console and the databases that it deploys are exposed outside (of course the ESXi also has to be visible outside to set this up)&amp;nbsp; and all other infrastructure related things are hidden within this appliance. This is where two network adapters will come in play. Lets go first with the steps and then a bit of explanation on why do it this way.&lt;br /&gt;
I am assuming that the ESXi Server and&amp;nbsp; vCenter VM has network connected to the live network adapter.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Connect to the vCenter through vSphere GUI or through the webclient. &lt;/li&gt;
&lt;li&gt;Create a new DataCenter.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Create a new Cluster&lt;/li&gt;
&lt;li&gt;Add the ESXi Host to this cluster&lt;/li&gt;
&lt;li&gt;Edit Settings for the Cluster to Enable&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt; vSphere HA (even though we cannot do it on a single Host)&lt;/li&gt;
&lt;li&gt;vSphere DRS &lt;/li&gt;
&lt;li&gt;"VM and Application Monitoring" in VM Monitoring&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Create a Distributed vSwitch as follows: &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Go to networking in Inventory you will see your corporate network called probably "VM Network"&lt;/li&gt;
&lt;li&gt;Add a new distributed vSwitch in the section where you have to add a physical Network Adapter, select the Network Adapter which is not plugged into the departmental network (Skip creating an automatic port group for the switch)&lt;/li&gt;
&lt;li&gt;Now for the dvSwitch created, create two port Groups "vCenter Network" and "Internal Network"&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;For the ESXi host create a vmKernel port in "vCenter Network" portgroup with a static IP address 192.168.2.2&lt;/li&gt;
&lt;li&gt;For the vCenter VM, create a new network adapter in the "vCenter Network" port group with a static IP of 192.168.2.1&lt;/li&gt;
&lt;li&gt;Change the Managed IP of vCenter Server (Administration-&amp;gt;vCenter Server Settings-&amp;gt;Runtime Settings)&amp;nbsp; to 192.169.2.1&lt;/li&gt;
&lt;li&gt;Make sure vCenter server can still access the ESXi server through the new "vCenter Network" portgroup&lt;/li&gt;
&lt;li&gt;Setup DHCP Server Appliance such that its LAN network is on "Internal Network"&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;I had setup DHCP&amp;nbsp; Server such that its own IP is 192.168.1.1 and it does DHCP on the network from range 192.168.1.5 to 192.168.1.250 (for my demo setup)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Step V: Deploy vFabric Data Director OVA Template &lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Using the vSphere Client (connected to our vCenter Server) deploy the vFabric Data Director OVA template.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;The setup wizard will ask you to select the network for vCenter and the Management console. For the vCenter Network select the "vCenter Network" portgroup and for the Management Console, select the "VM Network" which is the live departmental network&lt;/li&gt;
&lt;li&gt;If your setup is like mine, I do not have access to static IP adddress in the deparmental network so I just leave the next screen at its defaults to use DHCP and finish the deployment.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
Once the deployment finishes&amp;nbsp; there will be a new vApp called VMware Data Director.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt; Start the vAPP.&amp;nbsp; Once the vAPP starts, expand the "+" sign and select to the Management Server VM.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Select the "Summary" tab of Management Server and wait till it shows an IP address.&lt;/li&gt;
&lt;li&gt;Enter&amp;nbsp; that IP address in a browser and you should see message "This connection is untrusted" depending on your browse type, add it to your exceptions and then it should take you to License agreement screen.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Step VI: Setup vFabric Data Director&lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Read and accept the License agreement to proceed.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Next create an administrator account.&lt;/li&gt;
&lt;li&gt;On the next screen since this is a small setup, I selected the Global User Management Mode&lt;/li&gt;
&lt;li&gt;Setup the Branding as required on the next screen &lt;/li&gt;
&lt;li&gt;Setup the SMTP server information if available (needed for user password resets) (You also need outgoing email id for a successful setup of SMTP )&lt;/li&gt;
&lt;li&gt;On the next screen you have to setup vCenter Network Information. Since we dont have any DHCP on our "vCenter Network" portgroup, edit Network adapter settings and select "Static" with netmask information 255.255.255.0&lt;/li&gt;
&lt;li&gt;Set static IP addresses 192.168.2.3 for Management server and 192.168.2.4 for DB Name Server&lt;/li&gt;
&lt;li&gt;On the next screen change Internal Network to select "Internal Network" portgroup and leave DB Name Server Network as the "VM Network" which is the departmental network.&lt;/li&gt;
&lt;li&gt;On the following screen, select the network settings of "Internal Network"&amp;nbsp; DHCP should be already selected. Also check Static and add the network mask as 255.255.255.0&lt;/li&gt;
&lt;li&gt;For Management Server - Internal Network adapter, select static IP address and set it to 192.168.1.3 &lt;/li&gt;
&lt;li&gt;For DB Name Server - Internal Network adapter, select static IP address and set it to 192.168.1.4&lt;/li&gt;
&lt;li&gt; &lt;i&gt;Warning&lt;/i&gt;: This next bit is where you use your one static IP address or Dynamic DNS based FQDN requirement. We still have to provide DB Name Server - DB Name Service Network Adapter. If you have any influence on your IT, get a static IP address for this one. If you get the static IP, then click the Departmental "VM Network" setup and select static IP address with the associate Gateway, netmask and DNS Server setup. Then&amp;nbsp; set the static IP address for DB Name Server - DB Name Service Network Adapter with the static IP address that you get from your IT..&lt;/li&gt;
&lt;li&gt;Next enter your Evaluation License keys for vFabric Data Director and vFabric Postgres&lt;/li&gt;
&lt;li&gt;Finally verify information on the summary page and then click Finish&lt;/li&gt;
&lt;li&gt;You should get a login screen if it sets up successfully&lt;/li&gt;
&lt;/ul&gt;
&lt;u&gt;&lt;i&gt;Note&lt;/i&gt;&lt;/u&gt;: The most tricky bit is getting the IP address from IT. If for some reasons you do not have a static IP address, fake a&amp;nbsp; fully qualified domain name for DHCP. Once setup and you get a login screen. Figure out the DHCP IP allocated to DB Name Server using vSphere Client (It is first IP address that shows in the Summary tab of DB Name Server VM). Enter using your administrator account credentials, go to "Administration" tab. Select Settings-&amp;gt; Networking setup. Select Edit Network Setup and step through the setup again and change your fakeFQDN with the DHCP IP address and press finish. Of course this is a hack and not recommended since DHCP IP addresses can change anytime if the lease is up or the system is rebooted and other network policies.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step VII: Setting Up&amp;nbsp; an Resource Bundle in vFabric Data Director&lt;/b&gt;&lt;br /&gt;
For this we need a special Resource Pool in our Virtual Data Center&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Using vSphere Client we create a resource Pool "Resource Bundle1" in the data center&lt;/li&gt;
&lt;li&gt;Edit its settings such that it has reservations and limits matching for both CPU and memory&lt;/li&gt;
&lt;li&gt;Also "Unlimited" should not be checked for both CPU and Memory.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In my demo setup I set CPU reservations and limits to 4096MB and Memory reservations and limits to 4096 MB.&lt;/li&gt;
&lt;/ul&gt;
Enter the vFabric Management Console using your administrator credentials and go to "Manage &amp;amp; Monitor" tab.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt; Select "Resource Bundle" and create a new resource Bundle "ResourceBundle1".&lt;/li&gt;
&lt;li&gt; If the setup is right the next screen should show you the CPU/Memory Resource Pool that we created "Resource Bundle1"&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Next select the RAID protected datastore and a size chunk off it for Database Storage. Select any alternative or the same datastore for "Backup Storage" with a sizeable chunk. In my demo I selected my Raid5 based datastore and 100GB sizes for both.&lt;/li&gt;
&lt;li&gt;Next select the "VM Network" which is my departmental network through which uses will access the database.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Click Finish to setup the Resource Bundle.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step VII: Setup an Organization in vFabric Data Director&lt;/b&gt;&lt;br /&gt;
In "Manage&amp;amp;Monitor" select Organizations and create "+" a new organization called "DataDirectorOrg".&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;On the next screen you could select an new user or in my case I used "Choose an existing user" and used my administrator account to manage the Organization also.&lt;/li&gt;
&lt;li&gt;Next I selected the resource Bundle I just created (need to select "Choose an existing Resource Bundle" to see the resource bundle)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;click Finish.&lt;/li&gt;
&lt;/ul&gt;
Once created there will be the new Org displayed. If you select it once, the link becomes active. If you then select the active link again it will open a New tab for the Organization for our next step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step VIII: Setup a Database Group&lt;/b&gt;&lt;br /&gt;
Next we have to setup a database group.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;In the org tab select "Manage&amp;amp;Monitor" tab to see the list of databases (which is empty).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Select the second tab "Database Groups"&amp;nbsp; to see the empty group list&lt;/li&gt;
&lt;li&gt;Create ("+" ) a new database group "DBGroup1" where I selected half of my datastore resources assigned for this group leaving the rest of the entries at default.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step IX: Create a database&lt;/b&gt;&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;Select and enter the database group we just created.&lt;/li&gt;
&lt;li&gt;Create ("+") a new database "dbtest" with owner credentials "dba" and password.&lt;/li&gt;
&lt;li&gt;Wait till deployment of the database succeeds and "dbtest" is running.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Once running highlight it , right click to see the properties and get the UUID and Name. The client also needs the IP address of the DB Name server.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
Here is an image of the distributed vSwitch from vSphere client on my demo box.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-ob9aW4bvGus/To9t8zi5yrI/AAAAAAAAAFs/YXpLsShnA88/s1600/vDD-dvSwitchSetup.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-ob9aW4bvGus/To9t8zi5yrI/AAAAAAAAAFs/YXpLsShnA88/s640/vDD-dvSwitchSetup.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Step X: Connect to the database from a client&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://downloads.vmware.com/d/info/application_platform/vmware_vfabric_data_director/1_0#drivers_tools"&gt;Download vPostgres Clients for your platform&lt;/a&gt;. Then using psql from the client connect to the database similar to the following example &lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;
psql -h {dd9fce1e-db46-4a08-99a1-e9023b8239fe}.129.55.555.55 -d dbtest1 -U dba&lt;/div&gt;
&lt;br /&gt;
It should prompt for the dba password and now you are connected to the database and the setup is working. Check out my previous blog entry on how to &lt;a href="http://jkshah.blogspot.com/2011/09/pgwest-2011-using-vfabric-postgres-db.html"&gt;use vPostgres Clients&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Finally now the setup of vFabric Data Director all in a box setup is working and tested.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-4766006766399907518?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KzN_LPvNmB9R15B1KnyoZxaWzqs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KzN_LPvNmB9R15B1KnyoZxaWzqs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KzN_LPvNmB9R15B1KnyoZxaWzqs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KzN_LPvNmB9R15B1KnyoZxaWzqs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/Q8EqbFwNKIw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/4766006766399907518/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=4766006766399907518" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/4766006766399907518?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/4766006766399907518?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/Q8EqbFwNKIw/vfabric-data-director-all-in-box-setup.html" title="vFabric Data Director - All in a Box setup" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-ob9aW4bvGus/To9t8zi5yrI/AAAAAAAAAFs/YXpLsShnA88/s72-c/vDD-dvSwitchSetup.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/10/vfabric-data-director-all-in-box-setup.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MCRHwzeSp7ImA9WhdUE08.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-3387773758501610762</id><published>2011-09-29T16:51:00.000-04:00</published><updated>2011-09-29T16:51:05.281-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-29T16:51:05.281-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>#PGWest 2011 -   Using vFabric Postgres - A DB User's Perspective</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Here are my slides from my #PGWest 2011 Presentation " Using vFabric Postgres - A DB User's Perspective" for vPostgres Databases as&amp;nbsp; deployed by vFabric Data Director. &lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder="0" height="506" scrolling="no" src="http://app.sliderocket.com:80/app/fullplayer.aspx?id=03E8FDE2-3758-CB65-FB9A-8C60D5D96504" width="640"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-3387773758501610762?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZG6yp5gp5bnZLimTLz3pDD8NPPk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZG6yp5gp5bnZLimTLz3pDD8NPPk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZG6yp5gp5bnZLimTLz3pDD8NPPk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZG6yp5gp5bnZLimTLz3pDD8NPPk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/vU2j4dovBC4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/3387773758501610762/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=3387773758501610762" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3387773758501610762?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3387773758501610762?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/vU2j4dovBC4/pgwest-2011-using-vfabric-postgres-db.html" title="#PGWest 2011 -   Using vFabric Postgres - A DB User's Perspective" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/09/pgwest-2011-using-vfabric-postgres-db.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcESXw6eyp7ImA9WhdVE0s.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-6376568024340826917</id><published>2011-09-18T12:22:00.003-04:00</published><updated>2011-09-18T12:23:28.213-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-18T12:23:28.213-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VMware" /><title>Next Stop: #PgWest 2011 - San Jose</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Returned back from a great #pgopen in Chicago. It was nice to also see and meet again&amp;nbsp;senior VMware executives, PostgreSQL community members and lot of folks (aka customers or potential customers )&amp;nbsp;who use&amp;nbsp;PostgreSQL as&amp;nbsp;key databases in their&amp;nbsp;IT setup&amp;nbsp;&amp;nbsp;in the conference. &lt;br /&gt;
&lt;br /&gt;
Next stop now is #PgWest 2011 in San Jose starting on Septeber 27,2011.&amp;nbsp;This year again #PgWest is in San Jose, California.&lt;br /&gt;
&lt;br /&gt;
At this conference, I am presenting my first ever "&lt;a href="http://pgwest2011.sched.org/event/6ba83683a7284e72d8f6c7ae70bc24f2"&gt;Using vPostgres - A DB User perspective&lt;/a&gt;". The gist of this presentation is on how to use the vFabric Postgres client with the vFabric Postgres server deployed by vFabric Data Director. There are some small differences on how the client works compared to community PostgreSQL&amp;nbsp; and we will go over those in the session on exactly how it works, and see on how you use it for running and developing your own applications with it.&lt;br /&gt;
&lt;br /&gt;
Also Alex Mirgorodskiy, VMware&amp;nbsp;will be first time presenting in a PostgreSQL conference (that I am aware of at this point of time) on "&lt;a href="http://pgwest2011.sched.org/event/2c071cc144a3224465d968ff5efc4e2e"&gt;vFabric Postgres Database Internals&lt;/a&gt;".&amp;nbsp; In this session Alex will go over the subtle tansparent changes which makes vFabric Postgres so easy to deploy, manage and perform&amp;nbsp;in the vFabric Data Director world. Not to steal his thunder but this will cover the new Elastic Database Memory in detail. &lt;br /&gt;
&lt;br /&gt;
Bill Hodak, VMware&amp;nbsp;will present&amp;nbsp; about&amp;nbsp; &lt;a href="http://pgwest2011.sched.org/event/b4e660ac3c0b434c63a49b0abdc85b1c"&gt;vFabric Data Director&lt;/a&gt; itself on how it leverages the features of PostgreSQL and provide a management framework over it to provide enterprise framework and provide self-service features making it easy for even folks who donot know a lot about PostgreSQL database itself to deploy, tune, monitor, backup, restore, clone the database instances. &lt;br /&gt;
&lt;br /&gt;
And to give an overview of VMware's commitment to PostgreSQL Community, Charles Fan, Sr.VP - VMware R&amp;amp;D will be presenting the&lt;a href="http://pgwest2011.sched.org/event/4c76134980a75cab38427b6368bdf304"&gt; keynote at #PgWest&lt;/a&gt; 2011.&lt;br /&gt;
&lt;br /&gt;
Overall pretty excited about the conference and &amp;nbsp;to meet lot of new people&amp;nbsp;in the bay area.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-6376568024340826917?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iOvHV5p1Iw0j1CojoyNwFWSJBps/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iOvHV5p1Iw0j1CojoyNwFWSJBps/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iOvHV5p1Iw0j1CojoyNwFWSJBps/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iOvHV5p1Iw0j1CojoyNwFWSJBps/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/gDEwjH3QZNo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/6376568024340826917/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=6376568024340826917" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6376568024340826917?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6376568024340826917?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/gDEwjH3QZNo/next-stop-pgwest-2011-san-jose.html" title="Next Stop: #PgWest 2011 - San Jose" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/09/next-stop-pgwest-2011-san-jose.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYMRHg-eCp7ImA9WhdVEU8.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-6306735607110869582</id><published>2011-09-15T17:44:00.000-04:00</published><updated>2011-09-15T17:46:25.650-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T17:46:25.650-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Running PostgreSQL on Virtual Environments - #pgopen 2011</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Slides from my presentation&amp;nbsp; at Postgres Open 2011 (#pgopen11) in Chicago.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder="0" height="506" scrolling="no" src="http://app.sliderocket.com:80/app/fullplayer.aspx?id=6cd18c4b-dfd3-4ec8-aa98-bf5616fc451a" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-6306735607110869582?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GrPzRHXvbHkEUYWH-lzw8LUpi5o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GrPzRHXvbHkEUYWH-lzw8LUpi5o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GrPzRHXvbHkEUYWH-lzw8LUpi5o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GrPzRHXvbHkEUYWH-lzw8LUpi5o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/vP_Vg2JadFY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/6306735607110869582/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=6306735607110869582" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6306735607110869582?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6306735607110869582?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/vP_Vg2JadFY/running-postgresql-on-virtual.html" title="Running PostgreSQL on Virtual Environments - #pgopen 2011" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/09/running-postgresql-on-virtual.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YMSHw-eCp7ImA9WhdWGU8.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-1159629644880364127</id><published>2011-09-13T10:46:00.001-04:00</published><updated>2011-09-13T10:46:29.250-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-13T10:46:29.250-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Next Stop: Postgres Open 2011 - Chicago</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Soon I will be in Chicago for Postgres Open 2011. Here I will be presenting once again&amp;nbsp; &lt;br /&gt;
"&lt;a href="http://www.postgresopen.org/2011/schedule/presentations/44/"&gt;Running PostgreSQL on Virtualized Environments&lt;/a&gt;"&amp;nbsp; on Thurday - 11:30am in the Cotillion Ballroom (according to the &lt;a href="http://www.postgresopen.org/2011/schedule/"&gt;current schedule&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
The title should really be "Running Community PostgreSQL on Virtualized Environments" since this presentation really applies to the experiences of running community PostgreSQL in Virtual Machines.&amp;nbsp; Most of the things in the presentation should really be a checklist which helps you get the most of PostgreSQL in VMs. Of course depending on the VM and the underlying infrastructure, your mileage may vary.&lt;br /&gt;
&lt;br /&gt;
Overall I am also looking forward to attend other sessions (besides mine of course) . &lt;a href="http://www.postgresopen.org/2011/speaker/profile/3/"&gt;Greg Smith&lt;/a&gt; has couple of sessions which sounds interesting. There is &lt;a href="http://www.postgresopen.org/2011/schedule/presentations/1/"&gt;key note by&amp;nbsp; Charles Fan&lt;/a&gt; on Friday&amp;nbsp; (that should be no brainer for me). Probably the most interesting to me is "&lt;a href="http://www.postgresopen.org/2011/schedule/presentations/39/"&gt;Unlocking the Postgres Lock Manager&lt;/a&gt;" by Bruce Momjian which definitely is in line of my interest (since I try to control/avoid/reduce lock contentions and LWLocks in benchmarks which actually lead to my past presentation in pgcon on "&lt;a href="http://jkshah.blogspot.com/2011/05/understanding-postgresql-lwlocks-pgcon.html"&gt;Understanding Postgres LWLocks&lt;/a&gt;").&lt;br /&gt;
&lt;br /&gt;
Definitely looking forward for the trip. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-1159629644880364127?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CEF7dFX_-Y6xBHdBnOH9Sa0SPzI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CEF7dFX_-Y6xBHdBnOH9Sa0SPzI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CEF7dFX_-Y6xBHdBnOH9Sa0SPzI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CEF7dFX_-Y6xBHdBnOH9Sa0SPzI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/_OR6HE05qv4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/1159629644880364127/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=1159629644880364127" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/1159629644880364127?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/1159629644880364127?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/_OR6HE05qv4/next-stop-postgres-open-2011-chicago.html" title="Next Stop: Postgres Open 2011 - Chicago" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/09/next-stop-postgres-open-2011-chicago.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEMRng7fCp7ImA9WhdXFk8.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-8491836742844276753</id><published>2011-08-29T08:22:00.002-04:00</published><updated>2011-08-29T08:24:47.604-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-29T08:24:47.604-04:00</app:edited><title>VMware vFabric Data Director, VMware vFabric Postgres and CloudFoundry</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I am finally pleased to see that we are finally moving out of stealth mode. &lt;br /&gt;
&lt;br /&gt;
VMware announced vFabric Data Director at VMworld 2011 along with vFabric Postgres (vPostgres).&amp;nbsp; You will find lot of information already in the&lt;a href="http://www.vmware.com/company/news/releases/vmw-vfabric-data-director-vmworld-082911.html"&gt; press release&lt;/a&gt;. &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
VMware vFabric Data Director&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://www.blogger.com/goog_430509378"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.vmware.com/products/datacenter-virtualization/vfabric-data-director/"&gt;vFabric Data Director&lt;/a&gt; is a new VMware software product that enables enterprises to offer Database-as-a-Service. vPostgres is the the first database supported on vFabric Data Director. &lt;br /&gt;
It is&amp;nbsp; a self-service product which&amp;nbsp; takes the repetitive tasks of setting up a database right from virtual bare-metal to a fully running databases in minutes with features that you expect with an Enterprise quality database (deploying, monitoring, backup, restore, resizing, cloning and many other features). It helps to reduce the database sprawl and increases DBA productivity to handle large number of databases. It extends the vSphere platform to now include a data tier.&lt;br /&gt;
&lt;br /&gt;
You can find the product document, a product-demo and other information on the &lt;a href="http://www.vmware.com/products/datacenter-virtualization/vfabric-data-director/resources.html"&gt;resource page of&amp;nbsp; vFabric Data Director&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VMware vFabric Postgres (vPostgres)&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://www.blogger.com/goog_430509387"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.vmware.com/products/datacenter-virtualization/vfabric-data-director/features.html"&gt;vFabric Postgres&lt;/a&gt; is VMware's version of PostgreSQL. vPostgres is optimized for running on vSphere platforms. It is based on PostgreSQL 9.0. However there are some transparent changes which are significant in overall user experience.&amp;nbsp; Lets go over few of these key features&lt;br /&gt;
&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;&lt;li&gt;vFabric Postgres Elastic Database Memory: vPostgres Elastic database memory allows dynamic and seamless adaption of bufferpool in response to changing workloads on the hypervisor.&amp;nbsp; In traditional implementation, if you take out memory, the guest VMs&amp;nbsp; performance will goes down the drain. Most cloud users will have seen the symptoms for sure.&amp;nbsp; With vPostgres Elastic database memory , the effective bufferpool shrinks based on memory pressure dynamically and allows the overall system to be more graceful to this changing memory pressures.&amp;nbsp; This feature reduces the&amp;nbsp;&amp;nbsp; over-the-cliff drop in performance observed frequently in Cloud deployments of&amp;nbsp; databases.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Dynamic Checkpoint Tuning: In vPostgres, the priority is given to checkpoint_timeout which is referred to as Recovery Time Objective. In order to do the right balance between this Recovery Time Objective and overall performance, it dynamically shifts checkpoint_segments to keep a fine balance of adherence to RTO, performance and diskspace for WAL Logs. This allows reduction of manual tuning of checkpoints and allow the database server to dynamically find an optimum point based on changing workload.&lt;/li&gt;
&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;vPostgres also has some specific features when used with vFabric Data Director. vFabric&amp;nbsp; Data Director allows to change resources (vCPU, memory) set for a particular database. vData Director can then auto-tune the database based on the changed resources minimizing significantly the time to re-tune database. This allows DBAs to focus on more "business goal related tasks rather than day-to-day maintenance tasks.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Currently vPostgres will be only available for download as part of&amp;nbsp; vFabric Data Director. However there is a vPostgres Service available on &lt;a href="http://www.cloudfoundry.com/"&gt;CloudFoundry.com&lt;/a&gt; for Cloud Applications. It is free for use by all applications that support the Cloud Application programming which includes Java, Ruby, node.js&amp;nbsp; in CloudFoundry.com.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ vmc services&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;============== System Services ==============&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;+------------+---------+-------------------------------+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;| Service&amp;nbsp;&amp;nbsp;&amp;nbsp; | Version | Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;+------------+---------+-------------------------------+&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;| mongodb&amp;nbsp;&amp;nbsp;&amp;nbsp; | 1.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | MongoDB NoSQL store&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;| mysql&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 5.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | MySQL database service&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;| postgresql | 9.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | PostgreSQL database service&amp;nbsp;&amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;| rabbitmq&amp;nbsp;&amp;nbsp; | 2.4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | RabbitMQ messaging service&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;| redis&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Redis key-value store service |&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;+&lt;/span&gt;------------+---------+-------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
During a cloud deployment, you could select the "postgresql" service for your application.&lt;br /&gt;
More on CloudFoundry services&amp;nbsp; in a subsequent blog posts.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-8491836742844276753?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GpiCVAa3RrvAMoZ2y7Hh2jrIZIs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GpiCVAa3RrvAMoZ2y7Hh2jrIZIs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GpiCVAa3RrvAMoZ2y7Hh2jrIZIs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GpiCVAa3RrvAMoZ2y7Hh2jrIZIs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/Gw5XI69tHxI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/8491836742844276753/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=8491836742844276753" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/8491836742844276753?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/8491836742844276753?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/Gw5XI69tHxI/vmware-vfabric-data-director-vfabric.html" title="VMware vFabric Data Director, VMware vFabric Postgres and CloudFoundry" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/08/vmware-vfabric-data-director-vfabric.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IGSXY9cSp7ImA9WhdXFE4.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-3187519098656046301</id><published>2011-08-27T03:52:00.000-04:00</published><updated>2011-08-27T03:52:08.869-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-27T03:52:08.869-04:00</app:edited><title>VMworld 2011 - Las Vegas</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Arrived in Las Vegas early in the middle of the night for VMworld 2011 before Hurricane Irene hits the north east coast. In last few years,&amp;nbsp; this will be my first out of state conference which is not completely dedicated to PostgreSQL that I am attending. I am part of the &lt;a href="http://www.vmworld.com/blogs/vmworld/2011/08/23/dont-miss-hands-on-labs"&gt;Hands On Labs at VMworld&lt;/a&gt; which I heard are pretty popular in VMworld.&amp;nbsp; For database lovers I would recommend the&lt;br /&gt;
&lt;table border="0" cellpadding="3" cellspacing="0" class="catalogTable"&gt;&lt;tbody&gt;
&lt;tr class="headerRow_default labs"&gt;&lt;/tr&gt;
&lt;tr class="headerRow_default labs"&gt;&lt;th colspan="6"&gt; 							&lt;div class="sessionTitle"&gt;&lt;span class="sessionAbbr"&gt;#HOL12&lt;/span&gt;&amp;nbsp;Optimizing Data Access for Your Cloud Infrastructure &lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;It will be pretty interesting.&amp;nbsp; Also there are many other&lt;a href="https://vmworld2011.wingateweb.com/scheduler/newCatalog.do"&gt; Performance tuning sessions &lt;/a&gt;which will be also very interesting. &lt;br /&gt;
&lt;br /&gt;
Also there are many sessions available which may be difficult to short list. One of the things that is different from my other conferences that I attend is that one has to pre-register for the HOL or any sessions that one wants to attend otherwise they are denied entry to that session.&amp;nbsp; That is way difference and I still havent got around to figure out how the whole schedule builder works myself. So I would advice some extra time to make sure you can select your favorite sessions before they fill up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-3187519098656046301?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/W8pbAdrubeaRa8ymNrd11jmzUsk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W8pbAdrubeaRa8ymNrd11jmzUsk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/W8pbAdrubeaRa8ymNrd11jmzUsk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W8pbAdrubeaRa8ymNrd11jmzUsk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/DsuHpkRWesg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/3187519098656046301/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=3187519098656046301" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3187519098656046301?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3187519098656046301?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/DsuHpkRWesg/vmworld-2011-las-vegas.html" title="VMworld 2011 - Las Vegas" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/08/vmworld-2011-las-vegas.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYHR3c4eyp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-6158377419739278548</id><published>2011-05-20T11:08:00.002-04:00</published><updated>2011-09-08T14:55:36.933-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:55:36.933-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Understanding PostgreSQL LWLocks - PGCon 2011</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
From PGCon 2011 here are my slides on "Understanding PostgreSQL LWLocks"&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder="0" height="401" scrolling="no" src="http://app.sliderocket.com:80/app/fullplayer.aspx?id=37d4ee14-d151-4435-8f71-faff31f507c1" width="500"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Or alternatively at the &lt;a href="http://portal.sliderocket.com/AQXFX/PgCon2011_LWLocks"&gt;direct link&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-6158377419739278548?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pNvjCloP7O6QGUq3WwbxxQXczIA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pNvjCloP7O6QGUq3WwbxxQXczIA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pNvjCloP7O6QGUq3WwbxxQXczIA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pNvjCloP7O6QGUq3WwbxxQXczIA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/pPIL8cU5ieQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/6158377419739278548/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=6158377419739278548" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6158377419739278548?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6158377419739278548?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/pPIL8cU5ieQ/understanding-postgresql-lwlocks-pgcon.html" title="Understanding PostgreSQL LWLocks - PGCon 2011" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/05/understanding-postgresql-lwlocks-pgcon.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoyfyp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-8191430953905672145</id><published>2011-03-24T10:12:00.000-04:00</published><updated>2011-09-08T14:58:53.497-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.497-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Running Postgres in Virtualized Environment - #pgeast 2011</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Slides from today's presentation at PGEast.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://sites.google.com/site/pgmonitor/PgEast2011-VirtEnv.pdf"&gt;&lt;img border="0" height="240" src="https://lh3.googleusercontent.com/-7U4ldp8BQ7E/TYtQ7SDyz9I/AAAAAAAAADk/MtGVtdaPo0Y/s320/PgEast2011-VirtEnv.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
As usual feedback, questions welcome. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-8191430953905672145?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FZhABmoqJgp9ZQS7FuYEeKcpkG0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FZhABmoqJgp9ZQS7FuYEeKcpkG0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FZhABmoqJgp9ZQS7FuYEeKcpkG0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FZhABmoqJgp9ZQS7FuYEeKcpkG0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/0WaKpitJ8nA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/8191430953905672145/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=8191430953905672145" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/8191430953905672145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/8191430953905672145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/0WaKpitJ8nA/running-postgres-in-virtualized.html" title="Running Postgres in Virtualized Environment - #pgeast 2011" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/-7U4ldp8BQ7E/TYtQ7SDyz9I/AAAAAAAAADk/MtGVtdaPo0Y/s72-c/PgEast2011-VirtEnv.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/03/running-postgres-in-virtualized.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycCp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-3533920291007785987</id><published>2011-03-23T17:48:00.000-04:00</published><updated>2011-09-08T14:58:53.498-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.498-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Introduction to PostgreSQL for System Administrators - #pgeast 2011</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here are the slides from my presentation today at PGEast 2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://sites.google.com/site/pgmonitor/PgEast2011-IntroPGSA.pdf"&gt;&lt;img border="0" height="240" src="https://lh5.googleusercontent.com/-kIwqQRyOFQo/TYpo2ApSKpI/AAAAAAAAADU/NhVfmZfsx5M/s320/PgEast2011-IntroPGSA.jpg" width="320" /&gt; &lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
It turned out to be a fast faced presentation for 45 minutes. Online feedback, questions are welcome as usual.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update: Also my next presentation "PostgreSQL in Virtualized Environments" has moved to tomorrow (Thurday) at 9:00am in the Boardroom for the early bird attendees :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-3533920291007785987?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CqN2GfF14ahyAiMOxJAtcMOtQFo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CqN2GfF14ahyAiMOxJAtcMOtQFo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CqN2GfF14ahyAiMOxJAtcMOtQFo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CqN2GfF14ahyAiMOxJAtcMOtQFo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/31Q_Cbiiy-g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/3533920291007785987/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=3533920291007785987" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3533920291007785987?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3533920291007785987?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/31Q_Cbiiy-g/introduction-to-postgresql-for-system.html" title="Introduction to PostgreSQL for System Administrators - #pgeast 2011" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-kIwqQRyOFQo/TYpo2ApSKpI/AAAAAAAAADU/NhVfmZfsx5M/s72-c/PgEast2011-IntroPGSA.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/03/introduction-to-postgresql-for-system.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycCp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-6296803114040220112</id><published>2011-03-16T10:45:00.000-04:00</published><updated>2011-09-08T14:58:53.498-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.498-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>PgEast 2011 - New York</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Its less than week for&lt;a href="https://www.postgresqlconference.org/2011/east/agenda"&gt; PgEast 2011&lt;/a&gt;&amp;nbsp; and this time I have two sessions out there.&lt;br /&gt;
&lt;br /&gt;
My first session is on &lt;a href="https://www.postgresqlconference.org/files/east_2011_schedule.html"&gt;Wednesday at 3:00pm&lt;/a&gt; titled "&lt;a href="https://www.postgresqlconference.org/content/introduction-postgresql-system-administrators"&gt;Introduction to PostgreSQL for System Administrators&lt;/a&gt;" . This session is not about learning SQL or any real database feature but it is meant for system administrators to get their first exposure to PostgreSQL as an application running on their systems. We look at basic installation and some internals on understanding the various processes running on the system and understanding them.&lt;br /&gt;
&lt;br /&gt;
My session session is on &lt;a href="http://www.blogger.com/"&gt;Friday at 10:05am&lt;/a&gt; titled "&lt;a href="https://www.postgresqlconference.org/content/running-postgres-virtualized-environments"&gt;Running Postgres on Virtualized Environments&lt;/a&gt;". This session is about running Postgres in VM using VMware's vSphere. Many of the content while specific to vSphere can be used to understand in general when running Postgres on any virtual platform.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
With the increase in adoption of "Cloud Computing"&amp;nbsp; in various industries, I expect the usage of Postgres on VMs to increase dramatically in next few years. PgEast 2011 has a roundtable discussion with a panel of experts on Thursday at 2:30pm to precisely answer questions about deploying PostgreSQL in the cloud.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-6296803114040220112?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cRfvVi9JJCZeCTuq_HDrTzZBIfU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cRfvVi9JJCZeCTuq_HDrTzZBIfU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cRfvVi9JJCZeCTuq_HDrTzZBIfU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cRfvVi9JJCZeCTuq_HDrTzZBIfU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/WYfxjqnfgh8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/6296803114040220112/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=6296803114040220112" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6296803114040220112?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/6296803114040220112?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/WYfxjqnfgh8/pgeast-2011-new-york.html" title="PgEast 2011 - New York" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2011/03/pgeast-2011-new-york.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycCp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-7318592424956581374</id><published>2010-11-22T01:50:00.000-05:00</published><updated>2011-09-08T14:58:53.498-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.498-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>PostgreSQL 9.0 Simple Select Scaling using sysbench</title><content type="html">While I still haven't found a working way to test sysbench read-write test, I decided to continue on sysbench testing with PostgreSQL 9.0. This time I selected the oltp-test-mode=simple which essentially does a select lookup based on a primary key. The basic idea is to see if you are only doing a select statement how far can you scale.&lt;br /&gt;
&lt;br /&gt;
Here are my initial results with PostgreSQL 9.0&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/__9VTPFYIKns/TObu2eaDy5I/AAAAAAAAACw/w9GtPtI9VA8/s1600/PG9SimpleScaling.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/__9VTPFYIKns/TObu2eaDy5I/AAAAAAAAACw/w9GtPtI9VA8/s1600/PG9SimpleScaling.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This is still work in progress in some ways since this test has never been done before with PostgreSQL 9.0 (or atleast I haven't seen any body publish anything around this before).&lt;br /&gt;
&lt;br /&gt;
Anyway my real goal is not to just put the numbers here but to understand what is happening here. Round about 40-48 clients we seen to peak out on scaling and hit a wall as far as scaling goes. The statement is pretty simple select from sbtest with a primary key which is randomly generated.&lt;br /&gt;
&lt;br /&gt;
This is where I miss dtrace and OpenSolaris. Now that I am working on Linux it thought of trying it out with systemtap. The setting up of a working systemtap itself was a big challenge and took me some time to make it to work on my existing kernel. (Boy Linux should get their act straight at user level tracing. Its not omnipresent as dtrace on Solaris).&lt;br /&gt;
&lt;br /&gt;
I converted my old lockstat utility to work on systemtap. The script seems to work but systemtap can act funny sometimes like dont abruptly exit from systemtap&amp;nbsp; otherwise it may send a "wrong" signal to postgres backend which then just commits suicide since it cannot figure out what to do with such "trace/debug" signal.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOCKNAME LWID M W/A COUNT SUM-TIME(us) MAX(us) AVG-TIME(us)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 45 Ex W &amp;nbsp; 85343 469682510 13152 5503&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 57 Ex W&amp;nbsp;&amp;nbsp; 57547&amp;nbsp; 30903727&amp;nbsp; 8313&amp;nbsp; 537&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 44 Ex W &amp;nbsp; &amp;nbsp; 390 &amp;nbsp; &amp;nbsp; 34061&amp;nbsp; 1670&amp;nbsp;&amp;nbsp; 87&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 59 Ex W &amp;nbsp;&amp;nbsp;&amp;nbsp; 375&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 41570&amp;nbsp; 2032&amp;nbsp; 110&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 56 Ex W &amp;nbsp; &amp;nbsp; 361&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39685&amp;nbsp; 1889&amp;nbsp; 109&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 47 Ex W &amp;nbsp; &amp;nbsp; 344&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24548&amp;nbsp; 1564&amp;nbsp;&amp;nbsp; 71&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 54 Ex W &amp;nbsp; &amp;nbsp; 335 &amp;nbsp; &amp;nbsp; 67770&amp;nbsp; 2319&amp;nbsp; 202&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 50 Ex W &amp;nbsp; &amp;nbsp; 325 &amp;nbsp; &amp;nbsp; 44213&amp;nbsp; 1690&amp;nbsp; 136&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 49 Ex W &amp;nbsp; &amp;nbsp; 325&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39280&amp;nbsp; 1475&amp;nbsp; 120&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 55 Ex W &amp;nbsp; &amp;nbsp; 323&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39448&amp;nbsp; 1584&amp;nbsp; 122&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LockMgrLock 48 Ex W &amp;nbsp; &amp;nbsp; 323&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26982&amp;nbsp; 1669&amp;nbsp;&amp;nbsp; 83&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
What you see above is top WAITS on lwlocks by count and what was the average wait and max wait time for a particular LWLock.&lt;br /&gt;
&lt;br /&gt;
(Thinking it might be related to NUM_LOCK_PARTITIONS, I did some experiments with different sizes but since they are all related to the same table it does not help here.)&lt;br /&gt;
&lt;br /&gt;
Then I modified my lockstat script slightly to do stack straces for those two locks:&lt;br /&gt;
&lt;br /&gt;
Majority of those were pretty much caused by the same code path:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;span style="font-size: small;"&gt;Lock id:45, LockMode:0&lt;br /&gt;
&amp;nbsp;0x000000000062412e : LWLockAcquire+0x25e/0x270 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000006228cc : LockAcquireExtended+0x2dc/0xa40 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x0000000000620788 : LockRelationOid+0x48/0x60 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000064be85 : AcquireExecutorLocks+0xd5/0x190 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000064c96a : RevalidateCachedPlan+0x5a/0x3b0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000062ee64 : exec_bind_message+0x604/0xab0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x0000000000630bbd : PostgresMain+0x82d/0x16e0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000005f302e : ServerLoop+0x96e/0xcb0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000005f3dec : PostmasterMain+0xa7c/0x1150 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000044e4f0 : main+0x370/0x430 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&lt;br /&gt;
Lock id:57, LockMode:0&lt;br /&gt;
&amp;nbsp;0x000000000062412e : LWLockAcquire+0x25e/0x270 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000006228cc : LockAcquireExtended+0x2dc/0xa40 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x0000000000620788 : LockRelationOid+0x48/0x60 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x0000000000477425 : relation_open+0x55/0x90 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000047e5e3 : index_open+0x13/0x90 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000005732a5 : ExecInitIndexScan+0x125/0x1e0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x0000000000560275 : ExecInitNode+0x135/0x290 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000055ed80 : standard_ExecutorStart+0x530/0xc70 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000063278b : PortalStart+0x1bb/0x380 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000062ee9c : exec_bind_message+0x63c/0xab0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x0000000000630bbd : PostgresMain+0x82d/0x16e0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000005f302e : ServerLoop+0x96e/0xcb0 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x00000000005f3dec : PostmasterMain+0xa7c/0x1150 [/usr/local/aurora-1.0/bin/postgres]&lt;br /&gt;
&amp;nbsp;0x000000000044e4f0 : main+0x370/0x430 [/usr/local/aurora-1.0/bin/postgres]&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
So what I understand is that we have two problems here:&lt;br /&gt;
1. RevalidateCachedPlan (the Major bottleneck)&lt;br /&gt;
2. AccessShare Lock entry (the second bottleneck)&lt;br /&gt;
&lt;br /&gt;
Well atleast now I know the area where there seems to be some scaling bottlenecks which can limit simple SELECT statement scalings. The question now is what to do about them. Back to the mailing list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-7318592424956581374?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dUak-ySAxk8-nSx4KB604ytjCmg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dUak-ySAxk8-nSx4KB604ytjCmg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dUak-ySAxk8-nSx4KB604ytjCmg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dUak-ySAxk8-nSx4KB604ytjCmg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/LTmVPe5Lyrg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/7318592424956581374/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=7318592424956581374" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7318592424956581374?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7318592424956581374?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/LTmVPe5Lyrg/postgresql-90-simple-select-scaling.html" title="PostgreSQL 9.0 Simple Select Scaling using sysbench" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/__9VTPFYIKns/TObu2eaDy5I/AAAAAAAAACw/w9GtPtI9VA8/s72-c/PG9SimpleScaling.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/11/postgresql-90-simple-select-scaling.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycSp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-7904781470494142128</id><published>2010-11-18T15:00:00.000-05:00</published><updated>2011-09-08T14:58:53.499-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.499-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>sysbench, PostgreSQL 9.0 and OLTP complex read-write test</title><content type="html">Continuing with my sysbench saga with PostgreSQL 9.0, I was generally not encountering any errors except recently. I found two differences on how I did execute this test in order to hit this problem. One is I used a relatively small number of rows (1 million) which forces the special distribution of sysbench clients to be smaller and a reasonably high number of threads (80) as follows&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ sysbench --db-driver=pgsql --oltp-dist-type=special --oltp-table-size=1000000 --oltp-read-only=off --oltp-test-mode=complex --max-requests=0 --max-time=300 --num-threads=64 --test=oltp run&lt;/div&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sysbench 0.4.12:&amp;nbsp; multi-threaded system evaluation benchmark&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Running the test with following options:&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Number of threads: 80&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Doing OLTP test.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Running mixed OLTP test&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Using Special distribution (12 iterations,&amp;nbsp; 1 pct of values are returned in 75 pct cases)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Using "BEGIN" for starting transactions&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Using auto_inc on the id column&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Threads started!&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;FATAL: query execution failed: 9490352&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;FATAL: database error, exiting...&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Done.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the test failed with error reported in pg_log:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ERROR:&amp;nbsp; duplicate key value violates unique constraint "sbtest_pkey"&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;DETAIL:&amp;nbsp; Key (id)=(500815) already exists.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;STATEMENT:&amp;nbsp; INSERT INTO sbtest values($1,0,' ','aaaaaaaaaaffffffffffrrrrrrrrrreeeeeeeeeeyyyyyyyyyy')&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br /&gt;
&lt;br /&gt;
The way sysbench works for the complex read-write test transaction, after doing some bunch of selects and updates, it deletes a row and inserts the same row back. So in a transaction logic it should not hit this error since it just deleted the row. This took me some time to recreate it in a way that I could understand what is happening.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
What's happening is the timing of the start of a query in transaction with respect to another transaction in flight &lt;br /&gt;
working with the same key-value row such that the other transaction just deleted the row and also inserted the same row back in the same transaction.&lt;br /&gt;
&lt;br /&gt;
Lets consider two transactions A and B&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Transaction A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: purple;"&gt;Transaction B&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;BEGIN;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: purple;"&gt;BEGIN;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;DELETE FROM sbtest WHERE id=500815;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(returns DELETE 1)&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;INSERT INTO sbtest values(500815,0,'','aaaaaaaaaaffffffffffrrrrrrrrrreeeeeeeeeeyyyyyyyyyy');&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(returns INSERT 0 1)&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: purple;"&gt;DELETE FROM sbtest WHERE id=500815;&amp;lt; ------- hangs/waits&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;END;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(COMMIT)&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: purple;"&gt;(returns DELETE 0 – returns success but doesn’t delete any rows . It doesn't roll back the transaction)&lt;/span&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: purple;"&gt;INSERT INTO sbtest values(500815,0,'','aaaaaaaaaaffffffffffrrrrrrrrrreeeeeeeeeeyyyyyyyyyy');&lt;/span&gt;&lt;/div&gt;&lt;div style="color: purple; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ERROR: duplicate key value violates unique constraint "sbtest_pkey"&lt;/div&gt;&lt;div style="color: purple; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/div&gt;&lt;div style="color: purple; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ROLLBACK)&lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;br /&gt;
&lt;/div&gt;The way MySQL-InnoDB handles it is slightly different. It actually deletes the new row inserted and hence always can do the INSERT successfully and thats why sysbench with MySQL - InnoDB never showed that problem.&lt;br /&gt;
&lt;br /&gt;
If you read the &lt;a href="http://www.postgresql.org/docs/9.0/static/transaction-iso.html"&gt;documentation on PostgreSQL&lt;/a&gt; for READ COMMITTED Isolation level, it says: "In effect, a &lt;tt class="COMMAND"&gt;SELECT&lt;/tt&gt; query sees     a snapshot  of the database as of the instant the query begins to     run". So had the DELETE actually started after the END of the first transaction it would delete the new INSERTed row.I am not sure how other databases (ORACLE, DB2, etc) behave in this scenario.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
As one of my co-worker mentioned "Correctness is in the Implementation of Beholder", it is hard to say who is right or wrong..&lt;br /&gt;
&lt;br /&gt;
Just another one of the minor differences between MySQL and PostgreSQL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-7904781470494142128?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LjavuCZam1_R-66gdB8k-QiuEvo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LjavuCZam1_R-66gdB8k-QiuEvo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LjavuCZam1_R-66gdB8k-QiuEvo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LjavuCZam1_R-66gdB8k-QiuEvo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/4-pWTCxH4rM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/7904781470494142128/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=7904781470494142128" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7904781470494142128?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7904781470494142128?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/4-pWTCxH4rM/sysbench-postgresql-90-and-oltp-complex.html" title="sysbench, PostgreSQL 9.0 and OLTP complex read-write test" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>7</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/11/sysbench-postgresql-90-and-oltp-complex.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycSp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-7213717474780726559</id><published>2010-11-03T17:18:00.001-04:00</published><updated>2011-09-08T14:58:53.499-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.499-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>PostgreSQL in Virtual Environment - PGWest 2010</title><content type="html">Yesterday I had my presentation at PgWest 2010 at San Francisco.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://sites.google.com/site/pgmonitor/PGWest-VirtEnv.pdf"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/__9VTPFYIKns/TNHPYlp8vkI/AAAAAAAAACs/OiXdj7bupEE/s320/PGWest-VirtEnv-title.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
If you have questions on the presentation please feel free to leave comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-7213717474780726559?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j10qrEzx7cfFOCGfFJ85HShcGBM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j10qrEzx7cfFOCGfFJ85HShcGBM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/j10qrEzx7cfFOCGfFJ85HShcGBM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j10qrEzx7cfFOCGfFJ85HShcGBM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/I0mF5WHUdLY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/7213717474780726559/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=7213717474780726559" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7213717474780726559?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7213717474780726559?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/I0mF5WHUdLY/postgresql-in-virtual-environment.html" title="PostgreSQL in Virtual Environment - PGWest 2010" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/__9VTPFYIKns/TNHPYlp8vkI/AAAAAAAAACs/OiXdj7bupEE/s72-c/PGWest-VirtEnv-title.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/11/postgresql-in-virtual-environment.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycSp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-7132781331502868725</id><published>2010-10-04T15:50:00.001-04:00</published><updated>2011-09-08T14:58:53.499-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.499-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Postgres 9 and sysbench 0.4.12</title><content type="html">Ever since the release of Postgres 9 I was hoping for a chance to do some performance tests on it. I finally got around to try it out. This time I tried Postgres running in a virtual machine on top of VMware's vSphere Infrastructure 4.1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since there were plenty of sysbench numbers available for mysql, I thought it was time to try it with sysbench. The version I tried was sysbench 0.4.12. Compiling sysbench 0.4.12 for PostgreSQL itself was a huge challenge that it deserves a separate blogpost but for now lets start at the point where I got a working sysbench binary that I run it from a separate virtual machine against my Postgres database server.&lt;br /&gt;
&lt;br /&gt;
The first step to do a sysbench oltp was to do the "prepare" step where the benchmark tool creates the table and loads rows into the table. I saw many mysql tests running with 1 million rows or some with 10 million rows.&lt;br /&gt;
&lt;br /&gt;
So anyway I started with 1 million rows with similar options.&amp;nbsp;The load&amp;nbsp;started and went on and went on for a while.. (I should have taken a lunch break instead of waiting for it to finish.) It literally finished after some 20 odd minutes. I found that odd. So I downloaded MySQL 5.5 rc binaries and created a mysql database and compiled sysbench to run against MySQL and started the same "prepare" step with 1 million rows. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The "prepare" step finished for MySQL in an amazing 30 seconds or so. My first reaction was MySQL is damn fast than Postgres. As a Postgres lover I found that hard to believe. There's got to be some other problem. I added the --debug flag to sysbench and I saw the insert statements that sysbench did to mysql. When I used the same debug flag for Postgres version it did not show me any statements that it used.. That was no help.&lt;br /&gt;
&lt;br /&gt;
Anyway the Postgres was running on a version of the "late" OpenSolaris and used the query_time_breakdown.d script from pgfoundry dtrace scripts to see that the query that it was using to insert rows. I noticed that it was doing multi-row inserts on MySQL and single-row inserts on Postgres.&lt;br /&gt;
&lt;br /&gt;
Now came the hard part of reading through the sysbench code which took me some while to understand its layout and how it uses the database driver. To cut the long story short, I figured sysbench uses "drv_caps_t" structure to record the capabilities of the database drivers. The MySQL driver enables multi-row inserts while the Postgres driver had multi-row support disabled. &lt;br /&gt;
&lt;br /&gt;
Checking the documentation of Postgres I saw multi-row inserts in a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;INSERT&lt;/span&gt; statement is allowed.&lt;br /&gt;
&lt;br /&gt;
So I modified &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;sysbench/drivers/pgsql/drv_pgsql.c&lt;/span&gt; and changed&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;/* PgSQL driver capabilities */&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;static drv_caps_t pgsql_drv_caps =&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;NULL&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;};&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
to the following&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;/* PgSQL driver capabilities */&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;static drv_caps_t pgsql_drv_caps =&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;1,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;NULL&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;};&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The resulting difference that it now loads 1000 rows in each INSERT statement (like it does for MySQL)&lt;br /&gt;
&lt;br /&gt;
As for the difference it makes on the "prepare" operation:&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;$&amp;nbsp;time ./sysbench --pgsql-user=pguser --pgsql-password=xxxxxx --pgsql-db=sbtest --pgsql-host=pgdb --db-driver=pgsql --oltp-dist-type=special --oltp-table-size=1000000 --oltp-read-only=off --oltp-test-mode=complex --max-requests=0 --init-rng --max-time=300 --num-threads=96 --test=oltp --debug prepare &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;sysbench 0.4.12: multi-threaded system evaluation benchmark&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;Creating table 'sbtest'...&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;NOTICE: CREATE TABLE will create implicit sequence "sbtest_id_seq" for serial column "sbtest.id"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "sbtest_pkey" for table "sbtest"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;Creating 1000000 records in table 'sbtest'...&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;real 17m47.695s&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;user 0m0.328s&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;sys 0m0.700s&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;$&amp;nbsp;time ./sysbench --pgsql-user=pguser --pgsql-password=xxxxxx --pgsql-db=sbtest --pgsql-host=pgdb --db-driver=pgsql --oltp-dist-type=special --oltp-table-size=1000000 --oltp-read-only=off --oltp-test-mode=complex --max-requests=0 --init-rng --max-time=300 --num-threads=96 --test=oltp --debug prepare&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;sysbench 0.4.12: multi-threaded system evaluation benchmark&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;Creating table 'sbtest'...&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;NOTICE: CREATE TABLE will create implicit sequence "sbtest_id_seq" for serial column "sbtest.id"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "sbtest_pkey" for table "sbtest"&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;Creating 1000000 records in table 'sbtest'...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;real 0m36.237s&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;user 0m0.180s&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;sys 0m0.064s&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This looks much better and acceptable.&amp;nbsp; Now I can proceed to the real sysbench testing.&lt;br /&gt;
If somebody knows the&amp;nbsp; maintainer of the sysbench, can&amp;nbsp;you please point him to this blog article to&amp;nbsp;&amp;nbsp;get the drv_pgsql.c patched up to be similar to MySQL driver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-7132781331502868725?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hrYOrb0WrsL8gFU3hRhMycip_08/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hrYOrb0WrsL8gFU3hRhMycip_08/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hrYOrb0WrsL8gFU3hRhMycip_08/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hrYOrb0WrsL8gFU3hRhMycip_08/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/7JGP1ghd8wM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/7132781331502868725/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=7132781331502868725" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7132781331502868725?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/7132781331502868725?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/7JGP1ghd8wM/postgres-9-and-sysbench-0412.html" title="Postgres 9 and sysbench 0.4.12" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>5</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/10/postgres-9-and-sysbench-0412.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQHQnoycSp7ImA9WhdWFU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-9148865272571822262</id><published>2010-06-20T22:46:00.000-04:00</published><updated>2011-09-08T14:58:53.499-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T14:58:53.499-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgresql" /><title>Virtualization and Postgres</title><content type="html">It will be soon couple of months for me at VMware. I have been learning a lot of VMware and Virtualization. Often time I try to view it from the point of view of a database like Postgres. To say the least it has been a learning experience. &lt;br /&gt;
&lt;br /&gt;
In the most simplest form of understanding, virtualization (not to be confused with simulation or emulation) is a set of resources. The primary resources are CPU, Memory, Disk and Network. Then there are others but most others are not that interested for majority of the database users (or alteast for me).&amp;nbsp; For a java programmer this is more like an interface which can be implemented by a class but retains its properties. One cannot use it directly but you use a class typically implementing that interface. Similarly for virtualization&amp;nbsp;while you think only in terms of this interface resources&amp;nbsp;it is actually implemented by the underlying physical resources of the system. Hence it is&amp;nbsp;not to be confused with "emulation". &lt;br /&gt;
&lt;br /&gt;
That said one would think that they need not think of it as a "special" case in their deployment. This is where expectations and reality start to diverge and we could have a case of finger pointing. To set the right expectations for virtualization one needs to understand the philosophy behind virtualization which I guess is what I have been doing recently. It is more like soul-searching in some sense. From what I get the philosophy behind virtualization is actually efficient and simplified utilization of resources. Again lets go back to our primary resources CPU, Memory, Disk, Network. What virtualization tries to achieve is efficient utilization of these resources beyond one operating system. I think everyone understands the efficient utilization part. The clause that becomes tricky is "beyond one operating system". This clause is like the last minute change included by some smart lawyer which no one will understand till some years letter when another legal review is done. :-)&lt;br /&gt;
&lt;br /&gt;
This clause is what is causing many operating systems, applications like database to rethink their behavior of "My world is the only world here".&amp;nbsp; The details of these behaviour are actually too long to list but to give an idea, an idle operating system throws enough tick interrupts to keep the clock up to date that few of these operating systems while doing nothing can keep a core busy just to do these time updates. Occassionally it can happen that the interrupt that does not happen in time which can cause time drifting in operating systems.&lt;br /&gt;
&lt;br /&gt;
Similarly my experience with databases and shared memory is often the databases just pin the max memory we expect the database will use at peak loads. So even though it may be say 10-20% of the case that peak&amp;nbsp;utilization will occur but &amp;nbsp;memory has been&amp;nbsp; fully allocated and pinned (marked "unusable" for others) which may not be the most efficient way of using that resource. (Primary true in my past life where the immediate thing we do is use Intimate Shared Memory on Solaris so nothing else&amp;nbsp;can use it.)&amp;nbsp;Other thing that can come to mind is spin locks where CPU cylces are forced to spin to do nothing but wait, network polling to see if there is more incoming data and many other operations.&lt;br /&gt;
&lt;br /&gt;
Plus with the isolation provided a person within an operating system now has no idea what other things could be using the same resources that the OS is using which makes it more difficult for both the administrator and the Virtualization professional to reach some common understanding. :-) &lt;br /&gt;
&lt;br /&gt;
Anyway this is probably my first post on this topic in relation with Postgres. As I learn more things about Virtualization, you can expect me to share&amp;nbsp; my learning of the impact of&amp;nbsp;Virtualization on Postgres and vice versa. In the mean while if you have other "bugging" questions related to Postgres and Virtualization&amp;nbsp;do let me know and maybe I can test it out on my spare time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-9148865272571822262?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OypTtxLpymvtOJcTEvc4HGuc4nM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OypTtxLpymvtOJcTEvc4HGuc4nM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OypTtxLpymvtOJcTEvc4HGuc4nM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OypTtxLpymvtOJcTEvc4HGuc4nM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/Q5Qe55a9wEo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/9148865272571822262/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=9148865272571822262" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/9148865272571822262?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/9148865272571822262?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/Q5Qe55a9wEo/virtualization-and-postgres.html" title="Virtualization and Postgres" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/06/virtualization-and-postgres.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UER3w-eSp7ImA9WxFQE0U.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-5057327634099382036</id><published>2010-05-09T01:00:00.004-04:00</published><updated>2010-05-09T01:00:06.251-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-09T01:00:06.251-04:00</app:edited><title>Choosing stripsize in LUN or recordsize in ZFS for PostgreSQL</title><content type="html">In every database deployment, you have to request storage for the database. Typically in enterprises or cloud deployments, the requests goes to Storage Administrator who will ask you basics of the level of protection and probably some needs of the database if you are lucky. Many times they just give you a LUN or a filesystem (either based on NFS or something else). You have no idea whether that storage will suit your needs for the database or not. In this blogpost, lets even ignore the protection requirements to get the best performance out of the LUN.. RAID-0 typically is the best performing level. Some say RAID-1 is better for reads but I still havent enough practical cases to say yes that's the case. &lt;br /&gt;
&lt;br /&gt;
But even in RAID-0 I have seen charts all over the place. The Storage Administrator has no idea (unless you tell him/her) what the database will be doing on the LUN. Typically all RAID has what's known as the stripsize which in some ways is the blocksize that it uses to do a logical break and go to the next spindle. For example for a RAID-0 over 8 disks with a stripsize of 8K. Every write you do will be divided in terms of 8K and then will spread the writes over those 8 disks. Its is typically assumed that you can write every hard disk simultaneously so in this case for the same latency of writing to a single disk now you can do 8K x 8 or 64K simultaneously which typically will be less than writing 64K to the same spindle. (64K is also a typical stripsize available.) So why do we need to worry about the stripsize, we should select the smallest stripsize and just forget about it. Well for many arrays smallest strip size available is native block of the disk which is 512 Bytes to a typical max of 256KB or 512KB.&lt;br /&gt;
&lt;br /&gt;
Two reasons to worry about it: &lt;br /&gt;
&lt;br /&gt;
1. Modern disks technologies&amp;nbsp; including new SSDs or Flash technology basically are many times optimized for a block size (including flash technologies). In some flash based storage technologies, the write latency is same whether you write 512B or 4K. In such cases basically you are creating more work by writing smaller than that size. So obviously the smallest stripsize is not the most optimum.&lt;br /&gt;
&lt;br /&gt;
2. Also there is a penalty of using&amp;nbsp; the small strip size when you consider the throughput case. What is the throughput case? Throughput case is that you are really trying to get large amoun of data. How's it limited? Well it is limited by IOPS. Every disk has a working max range of how many IO operations it can sustain per second. Irrespective of what manufacturers say, the real random limit is more like anywhere from 100 IOPS to 160 IOPS per second with SATA on the real slow side, SAS somewhere in between and the Fiber Channel based disks on the high side. &lt;br /&gt;
&lt;br /&gt;
So lets say you can get about 150 IOPS per disk in your datacenter then your maximum sustainable throughput that can get from a stripsize of 4K is 4K x 150 x 8&amp;nbsp; which is like 4800KB/sec or abour 4.6 MB/sec.. Pretty slow. Now increasing the stripsize to 8K gives you double the througput and if you use the bigger stripsize like 128K you get about 150MB/sec and 512kb (typical max stripsize) allows you 600MB/sec. Ofcourse by this time you could already be limited by your bus technology. Both SAS/SATA have 3 Gig links which means realistically the max you can get is about 300-350MB/sec. &lt;br /&gt;
So in this case 256KB is a good choice for systems which needs to move large amount of data like Data Warehousing/DSS.&lt;br /&gt;
&lt;br /&gt;
But again remember the throughput comes at a cost. What is that cost? Latency. Time taken to read write increases as you increase the size of the IO. Repeating again the disks or flash technologies are optimized at a blocksize. If you go beyond that size the latency could increase linearly or sometimes exponentially (if it is a bad design). So you have to know your disks properly and make the right selection. For OLTP which is very sensitive to read and write operations for every transactions, an increase in latency by 100% can cause a drop of transactions by 50%&amp;nbsp; (depending on the workload) and hence can cause dramatic impact. For such database deployments, everything to cut down latency helps. &lt;br /&gt;
&lt;br /&gt;
So your storage can right now either do the best of OLTP layout or the best of throughput layout which is typically used by Data Warehousing or so-called Decision Support Systems. Many people sometimes do a trade-off to be somewhere in between and hence end up selecting stripsize somewher in between.&amp;nbsp; I have seen 64KB/128KB as common&amp;nbsp;stripsize where they try to do a balance.&amp;nbsp;So instead of making one group of people using the database unhappy, this tends to make all groups of people unhappy. But sometimes due to&amp;nbsp;the nature of the usage of the database and cost, &amp;nbsp;that's probably the right way to go. Though I would recommend actually figuring out the various databases and have multiple LUNS of various stripsize available to the database so that the DBA can make righ decisions based on the usage.&lt;br /&gt;
&lt;br /&gt;
The setting in ZFS called recordsize is similar to this stripsize except for the fact that its range is only from 8KB to 128KB. The default is 128KB for a reason that it can do a good tradeoff for all uses. However if you are going to do only OLTP type transactions, then changing that to 8KB is very helpful. The drawback is as soon you run any long running query which requires to scan through large amount of data and if you have 8KB recordsize&amp;nbsp;you will be limited by the throughput as explained above.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
What is really needed is dynamic stripsize or recordsize so it adapts to the write being done. However again the reads will be then dependent on the write stripsize which may not be case that you want. Most DSS/DW systems reads from OLTP systems so those will still be impacted if you have dynamic stripsize for writes which will be small if done through OLTP system. Hence an engineering problem to solve to remove dependence of these various stripsizes and record size.. Hey even databases have block sizes maybe even these blocksizes need to be adaptive :-)&lt;br /&gt;
&lt;br /&gt;
Of course questions for the reader is whether the blocksize of the database should be equal to strip size or equal to&amp;nbsp; N x stripsize where N is the number of "effective" disks in the array/LUN.&lt;br /&gt;
The real answer is it depends on the database technology.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-5057327634099382036?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3IES6rqw_JeCa4eJxIq4gNWOhfU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3IES6rqw_JeCa4eJxIq4gNWOhfU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3IES6rqw_JeCa4eJxIq4gNWOhfU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3IES6rqw_JeCa4eJxIq4gNWOhfU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/XezpTMjiPIo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/5057327634099382036/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=5057327634099382036" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5057327634099382036?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5057327634099382036?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/XezpTMjiPIo/choosing-stripsize-in-lun-or-recordsize.html" title="Choosing stripsize in LUN or recordsize in ZFS for PostgreSQL" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/05/choosing-stripsize-in-lun-or-recordsize.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EEQnkyfyp7ImA9WxFRGUk.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-2987250123029339677</id><published>2010-05-04T00:00:00.002-04:00</published><updated>2010-05-04T00:00:03.797-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-04T00:00:03.797-04:00</app:edited><title>Now at VMware Inc</title><content type="html">It looks like&amp;nbsp;I haven't blogged for a while. Thing have been busy. I am now working at VMware Inc. I will primarily be doing performance work. Hopefully I can still continue blogging here about Postgres and other Open Source technologies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-2987250123029339677?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vaWFerZzPoVMWkXEH3BPOUApFEE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vaWFerZzPoVMWkXEH3BPOUApFEE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vaWFerZzPoVMWkXEH3BPOUApFEE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vaWFerZzPoVMWkXEH3BPOUApFEE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/lcczVPZBI5E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/2987250123029339677/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=2987250123029339677" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/2987250123029339677?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/2987250123029339677?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/lcczVPZBI5E/now-at-vmware-inc.html" title="Now at VMware Inc" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/05/now-at-vmware-inc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EEQHo7fCp7ImA9WhZREU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-5714238371436205773</id><published>2010-04-15T17:00:00.001-04:00</published><updated>2011-04-06T12:00:01.404-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-06T12:00:01.404-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SunBlogs" /><title>My Last Day  and Blog Post at Sun</title><content type="html">&lt;p&gt;I am getting close to finish my 10th year at Sun Microsystems, Inc now part of Oracle America, Inc. However before I finish the year, it is time for me to move on with my new ventures. &lt;/p&gt;&lt;br/&gt;&lt;p&gt;Today is my last day in Sun/Oracle.&lt;br /&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;My new coordinates &lt;a href="http://jkshah.blogspot.com"&gt;http://jkshah.blogspot.com&lt;/a&gt;&amp;nbsp; and my &lt;a href="http://www.linkedin.com/in/jkshah"&gt;LinkedIn Profile&lt;/a&gt;. &lt;/p&gt;&lt;br/&gt;&lt;p&gt;Stay in touch.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-5714238371436205773?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vsCvPRMUA4W46mJCRBXwLSVXSr0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vsCvPRMUA4W46mJCRBXwLSVXSr0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vsCvPRMUA4W46mJCRBXwLSVXSr0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vsCvPRMUA4W46mJCRBXwLSVXSr0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/ihPgiqCA_Ac" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/5714238371436205773/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=5714238371436205773" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5714238371436205773?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5714238371436205773?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/ihPgiqCA_Ac/my-last-day-and-blog-post-at-sun_15.html" title="My Last Day  and Blog Post at Sun" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/04/my-last-day-and-blog-post-at-sun_15.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcNRX86fip7ImA9WxBUFUU.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-2732578600954767169</id><published>2010-03-02T21:38:00.001-05:00</published><updated>2010-03-02T21:41:34.116-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-02T21:41:34.116-05:00</app:edited><title>9.0devel and PGMonitor</title><content type="html">Using the latest CVS head, just upgraded my home setup to 9.0devel on OpenSolaris 2009.06&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ psql postgres&lt;br /&gt;
psql (9.0devel)&lt;br /&gt;
Type "help" for help.&lt;br /&gt;
&lt;br /&gt;
postgres=#&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
Also I upgraded the &lt;a href="http://sites.google.com/site/pgmonitor/pgmonitor.jnlp"&gt;PostgreSQL Monitor&lt;/a&gt; to use 8.4 JDBC4 driver instead of the 8.3 JDBC3 driver. Hopefully I will get some more time to enhance the tool itself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-2732578600954767169?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1t0PZBmWA-2jE2Px8FRYYIupO5s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1t0PZBmWA-2jE2Px8FRYYIupO5s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1t0PZBmWA-2jE2Px8FRYYIupO5s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1t0PZBmWA-2jE2Px8FRYYIupO5s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/M5AmRbyTNnw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/2732578600954767169/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=2732578600954767169" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/2732578600954767169?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/2732578600954767169?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/M5AmRbyTNnw/90devel-and-pgmonitor.html" title="9.0devel and PGMonitor" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/03/90devel-and-pgmonitor.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcDRXg_cCp7ImA9WxBWE0Q.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-3018414416949301737</id><published>2010-02-05T12:44:00.001-05:00</published><updated>2010-02-05T12:47:54.648-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-05T12:47:54.648-05:00</app:edited><title>Building latest PostgreSQL CVS Head on OpenSolaris</title><content type="html">With the talk about PostgreSQL 9.0 alpha 5, I thought it is time for me to try out another CVS head build on OpenSolaris. Of course this time this was on my home desktop which runs OpenSolaris 2009.06&lt;br /&gt;
I wanted to download the CVS head. The instructions are there on the &lt;a href="http://wiki.postgresql.org/wiki/Working_with_CVS"&gt;wiki page&lt;/a&gt;. However before following it I needed to install the CVS on my OpenSolaris instance.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#pkg install SUNWcvs&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The using the instructions I created a copy of the cvs repository and created my own project workspace.&lt;br /&gt;
&lt;br /&gt;
I already had the Sun Compilers on my setup. (If not or have an old copy then you can always install or upgrade it as&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg install sunstudio&lt;/div&gt;)&lt;br /&gt;
So I started my task of creating the new binaries on OpenSolaris. I found it to be bit bumpy.&lt;br /&gt;
Here is my configure options with my standard options.&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ ./configure --prefix=$HOME/project CFLAGS="-xO3 -xarch=native -xspace &lt;/span&gt;-W0,-Lt -W2,-Rcond_elim -Xa&amp;nbsp; -xildoff -xc99=none -xCC" --without-readline&lt;/div&gt;&lt;br /&gt;
However then I hit my first problem to do make.&lt;br /&gt;
Need to do using GNU make which was not installed on my desktop.&lt;br /&gt;
Back to pkg manager&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg install SUNWgmake&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;
&lt;/div&gt;Continuing again with make which proceeded and then eventually stopped again due to missing bison. (I wonder why the "configure" script did&amp;nbsp; not catch that?)&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg install SUNWbison&lt;/div&gt;&lt;br /&gt;
Anyway I started to run make again now that I have installed bison. Strangely it failed again.&lt;br /&gt;
Figured it still did not find bison. I had to use ./configure statement again and tried gmake after that which allowed gmake to pick up bison.&lt;br /&gt;
&lt;br /&gt;
However it failed again.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gmake[3]: Entering directory `/export/home/postgres/project/pgsql.project/src/backend/parser'&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/usr/bin/bison -d&amp;nbsp; -o gram.c gram.y&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gmake[3]: *** [gram.c] Broken Pipe&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gmake[3]: Leaving directory `/export/home/postgres/project/pgsql.project/src/backend/parser'&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gmake[2]: *** [parser/gram.h] Error 2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This one was not easy to solve. I thought that probably the bison was buggy and was about to give up. Then I thought I will give it a shot using truss to figure out what is happening&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ truss -f /usr/bin/bison -d -o gram.c gram.y 2&amp;gt; /tmp/bisontruss.txt&lt;/div&gt;&lt;br /&gt;
Going through that file bisontruss.txt I found:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;10451:&amp;nbsp; fcntl(6, F_DUP2FD, 0x00000001)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1&lt;br /&gt;
10451:&amp;nbsp; close(6)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0&lt;br /&gt;
10451:&amp;nbsp; execve("/usr/sfw/bin/gm4", 0x08047D00, 0x08047DA0) Err#2 ENOENT&lt;/div&gt;&lt;br /&gt;
I had no clue what gm4 does, but it is missing.&lt;br /&gt;
I used the search feature of OpenSolaris to see if there is a package associated with it.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg search gm4&lt;br /&gt;
INDEX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTION&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PACKAGE&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;.....&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;basename&amp;nbsp;&amp;nbsp; link&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usr/sfw/bin/gm4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pkg:/SUNWgm4@1.4.2-0.111&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As they say on TV : Yep, there's a pkg for that&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg install SUNWgm4&lt;/div&gt;&lt;br /&gt;
And now back to gmake&lt;br /&gt;
&lt;br /&gt;
Darn another package missing:&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gmake[3]: Entering directory `/export/home/postgres/project/pgsql.project/src/backend/bootstrap'&lt;br /&gt;
***&lt;br /&gt;
ERROR: `flex' is missing on your system. It is needed to create the&lt;br /&gt;
file `bootscanner.c'. You can either get flex from a GNU mirror site&lt;br /&gt;
or download an official distribution of PostgreSQL, which contains&lt;br /&gt;
pre-packaged flex output.&lt;br /&gt;
***&lt;br /&gt;
# pkg search -r flex&lt;br /&gt;
INDEX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTION&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PACKAGE&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;....&lt;br /&gt;
basename&amp;nbsp;&amp;nbsp; link&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usr/sfw/bin/flex&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pkg:/SUNWflexlex@2.5.33-0.111&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg install SUNWflexlex&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
(Of course gmake wont use it immediately till you use the configure statement again)&lt;br /&gt;
&lt;br /&gt;
Finally after a long time (it sure seemed to take a long time) the gmake seemed to hang on preproc.c compilation:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"preproc.y", line 13548: warning: line number in #line directive must be less than or equal to 32767&lt;/div&gt;&lt;br /&gt;
This is just not my day.&lt;br /&gt;
I did a cleanup of the make. At this point I found that I forgot to enable dtrace probes in my configure statement and also since I am using 64-bit kernel, decided to build 64-bit binaries. Retrying with the slightly modified configure still did not solve the loop problem in preproc.y which just runs 100% on the CPU. I left it running for a long while just to see if it finished (till my patience runs out) It did not finish.&lt;br /&gt;
&lt;br /&gt;
I finally updated my sunstudio binaries and retired&amp;nbsp; gmake. This time it succeeded in finishing the gmake. (Hence I changed my wordings above to reflect install/upgrade sunstudio). &lt;br /&gt;
&lt;br /&gt;
After that a quick gmake install&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ gmake install&lt;/div&gt;&lt;br /&gt;
and the binaries are ready.&lt;br /&gt;
A quick check reflects&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ initdb&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ pg_ctl start -l server.log&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ psql postgres&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;psql (8.5devel)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Type "help" for help.&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;postgres=#&lt;/div&gt;&lt;br /&gt;
For a second I was expecting to see psql(9.0develop) but this is still acceptable. :-)&lt;br /&gt;
&lt;br /&gt;
In Summary, you want to do the following before building the latest PostgreSQL source on OpenSolaris&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# pkg install SUNWcvs sunstudio SUNWgmake SUNWbison SUNWgm4 SUNWflexlex&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and the configure script&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ ./configure --prefix=$HOME/project CFLAGS="-m64 -xO3&amp;nbsp; -xarch=native -xspace -W0,-Lt -W2,-Rcond_elim -Xa&amp;nbsp; -xildoff -xc99=none -xCC" --without-readline --enable-dtrace DTRACEFLAGS="-64"&lt;/div&gt;&lt;br /&gt;
And with gmake I am ready to use the latest build of PostgreSQL on OpenSolaris.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-3018414416949301737?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OpDOqExGcLpDvqq7-8nqUqpszrk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OpDOqExGcLpDvqq7-8nqUqpszrk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OpDOqExGcLpDvqq7-8nqUqpszrk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OpDOqExGcLpDvqq7-8nqUqpszrk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/P8BVL5Po4Fg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/3018414416949301737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=3018414416949301737" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3018414416949301737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/3018414416949301737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/P8BVL5Po4Fg/building-latest-postgresql-cvs-head-on.html" title="Building latest PostgreSQL CVS Head on OpenSolaris" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/02/building-latest-postgresql-cvs-head-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EEQHo7fip7ImA9WhZREU0.&quot;"><id>tag:blogger.com,1999:blog-17085626.post-5206837550184218664</id><published>2010-02-05T04:52:00.001-05:00</published><updated>2011-04-06T12:00:01.406-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-06T12:00:01.406-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SunBlogs" /><title>Building latest PostgreSQL on OpenSolaris</title><content type="html">&lt;p&gt;I am moving my PostgreSQL on OpenSolaris realted entries to a new external &lt;a href="http://jkshah.blogspot.com"&gt;blog&lt;/a&gt;. Since it is not part of my $dayjob anymore. Hope you update your bookmarks too.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Read&amp;nbsp; &amp;quot;&lt;a href="http://jkshah.blogspot.com/2010/02/building-latest-postgresql-cvs-head-on.html"&gt;Building latest PostgreSQL CVS Head on OpenSolaris&lt;/a&gt;&amp;quot;.&lt;/p&gt;&lt;br/&gt;&lt;p&gt; &lt;br /&gt;&lt;/p&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17085626-5206837550184218664?l=jkshah.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sFCURJUPlvdfI-nXBHjSfZEkpR8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sFCURJUPlvdfI-nXBHjSfZEkpR8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sFCURJUPlvdfI-nXBHjSfZEkpR8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sFCURJUPlvdfI-nXBHjSfZEkpR8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JigneshShahsBlog/~4/V1m1hCutWAM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jkshah.blogspot.com/feeds/5206837550184218664/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=17085626&amp;postID=5206837550184218664" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5206837550184218664?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/17085626/posts/default/5206837550184218664?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/JigneshShahsBlog/~3/V1m1hCutWAM/building-latest-postgresql-on_05.html" title="Building latest PostgreSQL on OpenSolaris" /><author><name>Jignesh Shah</name><uri>https://profiles.google.com/107657423935937111113</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-0OfovQqFqZ0/AAAAAAAAAAI/AAAAAAAAAAA/7u4Ddq5wkC8/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://jkshah.blogspot.com/2010/02/building-latest-postgresql-on_05.html</feedburner:origLink></entry></feed>

