<?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>PRESOON.COM &#187; Pgsql</title>
	<atom:link href="http://presoon.com/blog/category/pgsql/feed/" rel="self" type="application/rss+xml" />
	<link>http://presoon.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 01 Jun 2011 09:19:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Failed to add site to database. DBERR: error &#8216;ERROR: duplicate key violates unique constraint &#8220;domain_key&#8221; &#8216; in &#8216; INSERT INTO siteinfo ENSIM</title>
		<link>http://presoon.com/blog/2009/03/06/failed-to-add-site-to-database-dberr-error-error-duplicate-key-violates-unique-constraint-domain_key-in-insert-into-siteinfo-ensim/</link>
		<comments>http://presoon.com/blog/2009/03/06/failed-to-add-site-to-database-dberr-error-error-duplicate-key-violates-unique-constraint-domain_key-in-insert-into-siteinfo-ensim/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 04:00:24 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[ensim]]></category>
		<category><![CDATA[Pgsql]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=79</guid>
		<description><![CDATA[Hello guys, You might have come accross the following error Failed to add site to database. DBERR: error &#8216;ERROR: duplicate key violates unique constraint &#8220;domain_key&#8221; &#8216; in &#8216; INSERT INTO siteinfo (site_id, domain, admin_user, email) VALUES (8, &#8216;domain.com&#8217;, &#8216;xxxx&#8217;, &#8216;xxx@domain.com&#8217;)&#8217; ========================= Here is the fix. Login to server via backend. su postgres Take a backup [...]]]></description>
			<content:encoded><![CDATA[<p>Hello guys, You might have come accross the following error</p>
<p>Failed to add site to database. DBERR: error &#8216;ERROR: duplicate key violates unique constraint &#8220;domain_key&#8221; &#8216; in &#8216; INSERT INTO siteinfo (site_id, domain, admin_user, email) VALUES (8, &#8216;domain.com&#8217;, &#8216;xxxx&#8217;, &#8216;xxx@domain.com&#8217;)&#8217;</p>
<p>=========================</p>
<p>Here is the fix.</p>
<p>Login to server via backend.</p>
<p>su postgres</p>
<p>Take a backup of the database&#8230;</p>
<p>pg_dump appldb &gt; appldb.dump.out</p>
<p>Now lets edit</p>
<p>psql</p>
<p>postgres=# \l</p>
<p>this will list all the databases. The Ensim database is &#8220;appldb&#8221;</p>
<p>postgres=# \c appldb<br />
You are now connected to database &#8220;appldb&#8221;.<br />
appldb=# \d</p>
<p>This will list all the tables in the database.</p>
<p>You can find the database siteinfo</p>
<p>appldb=# SELECT * FROM siteinfo WHERE domain=&#8217;domain.com&#8217;;</p>
<p>site_id |       domain       |        email        | admin_user<br />
&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;<br />
35 |domain.com | test@yahoo.com | dommn<br />
(1 row)<br />
it will list the entry. Now to fix  the issue, you need to delete that entry. Find the site_id for the domain. Here it is 35</p>
<p>DELETE FROM siteinfo WHERE site_id=35;</p>
<p>Now quit the database</p>
<p>appldb=# \q</p>
<p>bash-3.00$ exit</p>
<p>Restart services</p>
<p>/etc/rc.d/init.d/virtualhosting restart</p>
<p>/etc/rc.d/init.d/epld restart</p>
<p>Now try to add the domain from Control panel. <img src='http://presoon.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2009/03/06/failed-to-add-site-to-database-dberr-error-error-duplicate-key-violates-unique-constraint-domain_key-in-insert-into-siteinfo-ensim/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Installation  in RHEL    pgsql</title>
		<link>http://presoon.com/blog/2008/06/10/postgresql-installation-in-rhel-pgsql/</link>
		<comments>http://presoon.com/blog/2008/06/10/postgresql-installation-in-rhel-pgsql/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 11:38:28 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Pgsql]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=57</guid>
		<description><![CDATA[This is for fresh install. If you are going for an upgrade, you need to check out the steps from the link. ============== http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html ============== It is easy to install it via yum or up2date. However, if you need a specific version, it is better to go for rpm installation. Using yum ============== yum groupinstall [...]]]></description>
			<content:encoded><![CDATA[<p>This is for fresh install. If you are going for an upgrade, you need to check out the steps from the link.</p>
<p>==============</p>
<p>http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html</p>
<p>==============</p>
<p>It is easy to install it via yum or up2date.<br />
However, if you need a specific version, it is better to go for rpm installation.</p>
<p>Using yum</p>
<p>==============<br />
yum groupinstall postgresql<br />
==============</p>
<p>Using up2date.</p>
<p>==============<br />
up2date @ postgresql<br />
==============</p>
<p>Using rpm. You need three rpm.</p>
<p>==============<br />
postgresql-libs-<version>-1PGDG.rhel<br />
postgresql-server-<version>-1PGDG.rhel<br />
postgresql-<version>-1PGDG.rhel<br />
==============</p>
<p>Download the RPM from rpm.pbone.net for your coresponding OS and the required version.</p>
<p>dowload it to </p>
<p>==============<br />
/usr/local/src/<br />
==============</p>
<p>Install them using </p>
<p>==============<br />
rpm -ivh postgresql-libs-<version>-1PGDG.rhel<br />
rpm -ivh postgresql-server-<version>-1PGDG.rhel<br />
rpm -ivh postgresql-<version>-1PGDG.rhel<br />
==============</p>
<p>Once you have completed this you need can start the service.</p>
<p>==============<br />
/etc/rc.d/init.d/postgresql start<br />
==============</p>
<p>Edit the file &#8216;/var/lib/pgsql/data/pg_hba.conf&#8217;, replace all entries of &#8220;ident sameuser&#8221; with &#8220;trust&#8221;.<br />
Edit the file &#8216;/var/lib/pgsql/data/postgresql.conf&#8217;, change the line &#8220;max_connections=100&#8243; to atleast max_connections=500&#8243;. </p>
<p>Restart PostgreSQL.</p>
<p>If the initialisation fails the files pg_hba.conf and postgresql.conf will not be created.<br />
In such a case, perform the following operation.</p>
<p>Check the startup log which is found in /var/lib/pgsql/</p>
<p>==============<br />
chown postgres /var/lib/pgsql/data<br />
su postgres<br />
initdb –D /var/lib/pgsql/data<br />
==============</p>
<p>To make sure it starts automatically on boot &#8211; do the following command </p>
<p>==============<br />
chkconfig &#8211;list<br />
chkconfig postgresql on<br />
==============</p>
<p>Kill all the currently running postgre processes.</p>
<p>==================<br />
ps aux | grep post<br />
==================</p>
<p>==================<br />
kill -9
<process ID>
<process ID>
<process ID> &#8230;..<br />
==================</p>
<p>Try starting it again.<br />
 <img src='http://presoon.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2008/06/10/postgresql-installation-in-rhel-pgsql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install pdo_pgsql in Cpanel server</title>
		<link>http://presoon.com/blog/2008/04/23/how-to-install-pdo_pgsql-in-cpanel-server/</link>
		<comments>http://presoon.com/blog/2008/04/23/how-to-install-pdo_pgsql-in-cpanel-server/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 09:21:25 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Pgsql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[pdo_pgsql]]></category>
		<category><![CDATA[pecl]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=24</guid>
		<description><![CDATA[Its that easy to add the php module pdo_pgsql in a Cpanel server. Just use the command =============== pecl install pdo_pgsql =============== Then go for a Apache restart. It will be shown up in your phpinfo page&#8230;&#8230;..]]></description>
			<content:encoded><![CDATA[<p>Its that easy to add the php module pdo_pgsql in a Cpanel server.</p>
<p>Just use the command</p>
<p>===============<br />
pecl install pdo_pgsql<br />
===============</p>
<p>Then go for a Apache restart. It will be shown up in your phpinfo page&#8230;&#8230;..<br />
 <img src='http://presoon.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2008/04/23/how-to-install-pdo_pgsql-in-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

