<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Future Imperfect</title>
	<atom:link href="http://www.ozkan.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ozkan.co.uk</link>
	<description>Gets I.T a bit maybe even a byte</description>
	<lastBuildDate>Fri, 17 May 2013 23:09:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>PostgreSQL upgrade from 8.1 to 9.1 using slony1 &#8211; Part 2</title>
		<link>http://www.ozkan.co.uk/2012/01/27/postgresql-upgrade-from-8-1-to-9-1-using-slony1-part-2/</link>
		<comments>http://www.ozkan.co.uk/2012/01/27/postgresql-upgrade-from-8-1-to-9-1-using-slony1-part-2/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 16:51:40 +0000</pubDate>
		<dc:creator>Ejber</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.ozkan.co.uk/?p=270</guid>
		<description><![CDATA[Before you start the upgrade of your progresql services you should already have your Postgresql 9.x servers configured and installed including any additional streaming replicated servers already streaming and running OK, however you will only be dealing with the Read/Write server (node 2 here) . I would also recommend some configuration adjustments to checkpoint segments [...]]]></description>
				<content:encoded><![CDATA[<p>Before you start the upgrade of your progresql services you should already have your Postgresql 9.x servers configured and installed including any additional streaming replicated servers already streaming and running OK, however you will only be dealing with the Read/Write server (node 2 here) . I would also recommend some configuration adjustments to checkpoint segments for the initial loading.</p>
<h3>Compile slony1 on both server-node-1 (8.x) &amp; server-node-2 (9.x)</h3>
<pre escaped="true" lang="bash" line="1">cd /home/somedirectory/
tar -xvf slony1-1.2.22.tar.bz2
mkdir /var/log/slony
chown -R postgres:postgres /var/log/slony
chown -R postgres:postgres /var/lib/pgsql/
cd slony1-1.2.22
# node 1 (8.x)
./configure --prefix=/var/lib/pgsql/data/ --with-perltools
# node 2 (9.x)
./configure --with-pgconfigdir=/usr/pgsql-9.1/bin --prefix=/var/lib/pgsql/9.1/data/ --with-perltools
make clean
make
make install</pre>
<p>&#8212;&#8211;</p>
<p>Note that <strong>&#8211;prefix=</strong> could vary on both nodes, now that Slony is installed</p>
<p>On node 2 (9.x) if you haven&#8217;t initialised the DB:</p>
<pre escaped="true" lang="bash" line="1">service postgresql-9.1 initdb</pre>
<p>you should also create the new database with same credentials as node 1s database</p>
<pre escaped="true" lang="bash" line="1">su - postgres
/usr/bin/createdb --encoding UTF8 myDatabaseName

echo "alter user postgres with password 'xxxx';" | psql
echo "create user myDBUser nocreatedb createuser;" | psql
echo "alter user myDBUser with password 'xxxxx';" | psql
echo "create language plpgsql;" | psql</pre>
<p>&nbsp;</p>
<p># again ,these commands will vary and you may or may not wish to use them at all , I prefer to set a postgres password for example.</p>
<p>Now on node-1 (8.1)</p>
<p>&nbsp;</p>
<pre escaped="true" lang="bash" line="1">su - postgres
my-database.postgres:~&gt; pg_dumpall -v --globals-only &gt; useraccts.sql
my-database.postgres:~&gt; pg_dump -s myDatabaseName &gt; myDatabaseName.schema</pre>
<p>transfer the two files created above to your node 2 (9.1) and put them somewhere sensible like /var/lib/pgsql/9.1/</p>
<p>On node-2 (9.1) Load the user accounts and schemas that you copied over into the clean database:</p>
<pre escaped="true" lang="bash" line="1">su - postgres
cd /var/lib/pgsql/9.1
psql &lt; useraccts.sql
su - myDatabaseName
psql &lt; myDatabaseName.schema</pre>
<p># Now this is the time to review your schema and indexes to ensure names and values are consistent , you may need to alter _seq numbered names for example. This is usually related to creating and renaming things during the lifespan of the old Database.</p>
<p>Ensure /var/lib/pgsql/9.1/data/etc/slon_tools.conf (on node 2) and /var/lib/pgsql/data/etc/slon_tools.conf (node 1) are the same.</p>
<p>This file is the key to the whole process and it may take several attempts to complete the replication properly by adjusting the file.If the replication failed , I found that it is better to start from a clean database on Node 2 and try again.</p>
<p>Here is an example sample with indexes used as keytables (dont ask!) and seq&#8230;</p>
<pre escaped="true" lang="conf" line="1">#My system MyDatabase
#
if ($ENV{"SLONYNODES"}) {
    require $ENV{"SLONYNODES"};
} else {

    $CLUSTER_NAME = 'replication';
    $LOGDIR = '/var/log/slony';
    # $APACHE_ROTATOR = '/usr/local/apache/bin/rotatelogs';
    # SYNC check interval (slon -s option)
    # $SYNC_CHECK_INTERVAL = 1000;
    # Which node is the default master for all sets?
    $MASTERNODE = 1;

    add_node(node     =&gt; 1,
             host     =&gt; 'node1.postgres81.com',
             dbname   =&gt; 'myDatabaseName',
             port     =&gt; 5432,
             user     =&gt; 'postgres',
             password =&gt; 'xxxx');

    add_node(node     =&gt; 2,
             host     =&gt; 'node2.postgres91.com',
             dbname   =&gt; 'MyDatabaseName',
             port     =&gt; 5432,
             user     =&gt; 'postgres',
             password =&gt; 'xxxx');

}

$SLONY_SETS = {

    "set1" =&gt; {

        "set_id" =&gt; 1,
        "table_id"    =&gt; 1,
        "sequence_id" =&gt; 1,

        "keyedtables" =&gt; {
                        'account' =&gt; 'account_idx1',
                        'aged_debt' =&gt; 'aged_debt_idx1'

#....
        },

        # Sequences that need to be replicated should be entered here.
        "sequences" =&gt; ['account_id_seq',
                        'aged_debt_id_seq'

#...
   },

};

if ($ENV{"SLONYSET"}) {
    require $ENV{"SLONYSET"};
}

# Please do not add or change anything below this point.
1;</pre>
<p>&nbsp;</p>
<p>Obviously you&#8217;ll need to replace with your own tables and database names etc, also ensure that the /etc/hosts is set so that names of the host resolve OK on both nodes.</p>
<p>On node-1 (8.x)</p>
<pre escaped="true" lang="bash" line="1">cd /var/lib/pgsql/data/bin
./slonik_init_cluster &gt; /tmp/init.txt
cat /tmp/init.txt | ./slonik
./slon_start 1 --nowatchdog</pre>
<p>node-2 (9.x)</p>
<pre escaped="true" lang="bash" line="1">cd /var/lib/pgsql/9.1/data/bin
./slon_start 2 --nowatchdog</pre>
<p>node-1 (8.1)</p>
<pre escaped="true" lang="bash" line="1">cd /var/lib/pgsql/data/bin
./slonik_create_set set1 &gt; /tmp/createset.txt
cat /tmp/createset.txt | ./slonik
./slonik_subscribe_set 1 2 &gt; /tmp/subscribe.txt
cat /tmp/subscribe.txt | ./slonik</pre>
<p>And now we wait &#8230;<br />
logging occurs in /var/log/slony/slony1/node1 and /var/log/slony/slony1/node2<br />
on node 2 grep for &#8220;copied&#8221;<br />
#.e.g tail -F ats-2012-01-09_11:18:29.log | grep copied</p>
<p>you can also check the replication view st_lag_num_events on the primary node .</p>
<p>You can either leave it running for ever . Or once your happy with the upgrade , stop any applications using 8.x then kill slony1 and then stop 8.x postgresql service</p>
<p># once complete</p>
<p>on node 1 (8.x)</p>
<pre escaped="true" lang="bash" line="1">cd /var/lib/pgsql/data/bin
./slonik_uninstall_nodes | ./slonik</pre>
<p>on node 1 and 2</p>
<pre escaped="true" lang="bash" line="1">./slon_kill</pre>
<p>And your ready to switch you applications to the new server and start them up , with minimal downtime!</p>
<p># Additional Note if you want to rerun things you should be able run ./slon_kill and then echo &#8220;drop schema _replication cascade;&#8221; | psql (for example)  , to start again as its all pretty safe.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozkan.co.uk/2012/01/27/postgresql-upgrade-from-8-1-to-9-1-using-slony1-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ipad 2 is just a speak and spell</title>
		<link>http://www.ozkan.co.uk/2011/12/20/ipad-2-is-just-a-speak-and-spell/</link>
		<comments>http://www.ozkan.co.uk/2011/12/20/ipad-2-is-just-a-speak-and-spell/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 15:03:58 +0000</pubDate>
		<dc:creator>Ejber</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Ipad 2]]></category>
		<category><![CDATA[speak and spell]]></category>

		<guid isPermaLink="false">http://www.ozkan.co.uk/?p=261</guid>
		<description><![CDATA[It is amazing the convergence of technology and the incredible reduction in component pricing that has come together to bring forth the wonders of iPad to the masses. From the incredible advances in flash technology for storage to the ARM based processor (via Acorn/BBC) and touch technology and all the tools and SDKs that allow [...]]]></description>
				<content:encoded><![CDATA[<p>It is amazing the convergence of technology and the incredible reduction in component pricing that has come together to bring forth the wonders of iPad to the masses. From the incredible advances in flash technology for storage to the ARM based processor (via Acorn/BBC) and touch technology and all the tools and SDKs that allow you to build all the apps you could shake a infra-red touch screen at, and the embedded OS that it is sat on.<br />
It makes me incredibly happy then that using these evil products to know that in twenty years time people may look back at the iPad as if they were holding the equivalent of a speak and spell. The things we are amazed at now will be <em>&#8216;so 2011</em>&#8216;. My fledglings often tell me how awful things of my youth are with the words &#8216;<em>thats so 90s</em>&#8216; , I&#8217;m sure they will get the same treament when the table(t)s are turned and I can then roll over happily were ever I maybe laying.<br />
I cant begin to fathom the advancements we will make in another 30 years of components that will produce some exciting future gadgets. I&#8217;d like to see what will happen with bendable/fold-able screens and tablets in the coming years for example. I need one to fold away an embarrassing app that I may or may not be playing in a public place.</p>
<div id="attachment_266" class="wp-caption aligncenter" style="width: 223px"><a href="http://www.ozkan.co.uk/wp-content/uploads/2011/12/speak_n_spell.gif"><img class="size-medium wp-image-266" title="speak_n_spell" src="http://www.ozkan.co.uk/wp-content/uploads/2011/12/speak_n_spell-213x300.gif" alt="" width="213" height="300" /></a><p class="wp-caption-text">A speak and spell yesterday</p></div>
<p>Here is a <a title="article" href="http://doerrhb.blogspot.com/2011/01/original-tablet-pc-circa-1978.html" target="_blank">link to an article</a> to a break down of all the differences between the two systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozkan.co.uk/2011/12/20/ipad-2-is-just-a-speak-and-spell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL upgrade from 8.1 to 9.1</title>
		<link>http://www.ozkan.co.uk/2011/09/26/postgresql-upgrade-from-8-1-to-9-1/</link>
		<comments>http://www.ozkan.co.uk/2011/09/26/postgresql-upgrade-from-8-1-to-9-1/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 14:11:03 +0000</pubDate>
		<dc:creator>Ejber</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.ozkan.co.uk/?p=259</guid>
		<description><![CDATA[Been trying for a while to upgrade a really old database with a really new one, with no downtime , this I managed successfully with Slony-I . with slony 2 its is not possible to go from such an old version of PostgreSQL unfortunately, However Slony 1 worked great  pretty much first time. The only [...]]]></description>
				<content:encoded><![CDATA[<p>Been trying for a while to upgrade a really old database with a really new one, with no downtime , this I managed successfully with <a href="http://slony.info/#">Slony-I </a>. with slony 2 its is not possible to go from such an old version of PostgreSQL unfortunately, However Slony 1 worked great  pretty much first time. The only fiddly and long process is setting up the slon_tools.conf file to identify all the table and sequence you need to replicate on your new shiny 9.1 release.I originally successfully replicated to 9.0 as well BTW.</p>
<p>The PostgreSQL 9 release allowed me to also test its own streaming replication , this meant that actually both master &amp; slave of PostgreSQL 9.x needs to be up and running before migrating and replicating from 8.1 with slony 1. Got that tip from <a href="http://twitter.com/#!/devrimgunduz" target="_blank">@DevrimGunduz</a> himself no less.</p>
<p>Its actually not that difficult , Luckily for me If I mess up (not that I did as it happens!) I have all the power of VMWare to go back to an older snapshot.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozkan.co.uk/2011/09/26/postgresql-upgrade-from-8-1-to-9-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerEdge M710HD &#8230; Lets go to work</title>
		<link>http://www.ozkan.co.uk/2011/08/18/poweredge-m710hd-lets-go-to-work/</link>
		<comments>http://www.ozkan.co.uk/2011/08/18/poweredge-m710hd-lets-go-to-work/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 16:16:20 +0000</pubDate>
		<dc:creator>Ejber</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.ozkan.co.uk/?p=252</guid>
		<description><![CDATA[Just started &#8216;playing&#8217; with a &#8216;few&#8217; PowerEdge M710HD kits from dell, very nice it is too , Nice boost of resources and good smattering of power saving to top it off, plus lots of boring hardware enhancements&#8230; .]]></description>
				<content:encoded><![CDATA[<p>Just started &#8216;playing&#8217; with a &#8216;few&#8217; PowerEdge M710HD kits from dell, very nice it is too , Nice boost of resources and good smattering of power saving to top it off, plus lots of boring hardware enhancements&#8230; <img src='http://www.ozkan.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<div id="attachment_253" class="wp-caption aligncenter" style="width: 373px"><a href="http://www.ozkan.co.uk/wp-content/uploads/2011/08/dell-m710hd.png"><img class="size-full wp-image-253" title="dell-m710hd" src="http://www.ozkan.co.uk/wp-content/uploads/2011/08/dell-m710hd.png" alt="" width="363" height="410" /></a><p class="wp-caption-text">Ready for Action!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ozkan.co.uk/2011/08/18/poweredge-m710hd-lets-go-to-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL &amp; Java HugePages</title>
		<link>http://www.ozkan.co.uk/2011/08/04/rhel-java-hugepages/</link>
		<comments>http://www.ozkan.co.uk/2011/08/04/rhel-java-hugepages/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 10:27:51 +0000</pubDate>
		<dc:creator>Ejber</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.ozkan.co.uk/?p=247</guid>
		<description><![CDATA[I just implemented HugePages in RHEL6.1 and Java , I think this will be of great (but short term) benefit. VMware appears to play well with it too. A small configuration change that can make a big difference in performance. I found these sites to be still relevant and extremely useful: http://andrigoss.blogspot.com/2008/02/jvm-performance-tuning.html http://www.peuss.de/node/67 &#160;]]></description>
				<content:encoded><![CDATA[<p>I just implemented HugePages in RHEL6.1 and Java , I think this will be of great (but short term) benefit. VMware appears to play well with it too. A small configuration change that can make a big difference in performance.</p>
<p>I found these sites to be still relevant and extremely useful:</p>
<p><a title="jvm performance tuning" href="http://andrigoss.blogspot.com/2008/02/jvm-performance-tuning.html" target="_blank">http://andrigoss.blogspot.com/2008/02/jvm-performance-tuning.html</a></p>
<p><a title="Calculator" href="http://www.peuss.de/node/67" target="_blank">http://www.peuss.de/node/67</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozkan.co.uk/2011/08/04/rhel-java-hugepages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.123 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-18 00:14:52 -->

<!-- Compression = gzip -->