<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-768</id>
	<title>Nabble - PostgreSQL - general</title>
	<updated>2009-12-17T19:28:44Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/PostgreSQL---general-f768.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PostgreSQL---general-f768.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26838603</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T19:28:44Z</published>
	<updated>2009-12-17T19:28:44Z</updated>
	<author>
		<name>Scott Marlowe-2</name>
	</author>
	<content type="html">On Thu, Dec 17, 2009 at 7:51 PM, David Boreham &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838603&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david_list@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Scott Marlowe wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would recommend using a traffic shaping router (like the one built
&lt;br&gt;&amp;gt;&amp;gt; into the linux kernel and controlled by tc / iptables) to simulate a
&lt;br&gt;&amp;gt;&amp;gt; long distance connection and testing this yourself to see which
&lt;br&gt;&amp;gt;&amp;gt; replication engine will work best for you.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Netem  :
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.linuxfoundation.org/collaborate/workgroups/networking/netem&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxfoundation.org/collaborate/workgroups/networking/netem&lt;/a&gt;&lt;br&gt;&amp;gt; We used this to make a test rig for Directory Server replication, to verify
&lt;br&gt;&amp;gt; a
&lt;br&gt;&amp;gt; re-design that added pipelining to the replication protocol.
&lt;br&gt;&amp;gt; It's already in the modern Linuxes--just needs to be configured.
&lt;/div&gt;&lt;br&gt;Wow, everytime I turn around someone's built something cool from a set
&lt;br&gt;of small sharp tools. &amp;nbsp;Thanks!
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838603&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26838603.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838420</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T18:51:08Z</published>
	<updated>2009-12-17T18:51:08Z</updated>
	<author>
		<name>David Boreham-2</name>
	</author>
	<content type="html">Scott Marlowe wrote:
&lt;br&gt;&amp;gt; I would recommend using a traffic shaping router (like the one built
&lt;br&gt;&amp;gt; into the linux kernel and controlled by tc / iptables) to simulate a
&lt;br&gt;&amp;gt; long distance connection and testing this yourself to see which
&lt;br&gt;&amp;gt; replication engine will work best for you.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Netem &amp;nbsp;: 
&lt;br&gt;&lt;a href=&quot;http://www.linuxfoundation.org/collaborate/workgroups/networking/netem&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxfoundation.org/collaborate/workgroups/networking/netem&lt;/a&gt;&lt;br&gt;We used this to make a test rig for Directory Server replication, to 
&lt;br&gt;verify a
&lt;br&gt;re-design that added pipelining to the replication protocol.
&lt;br&gt;It's already in the modern Linuxes--just needs to be configured.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838420&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26838420.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838384</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T18:47:18Z</published>
	<updated>2009-12-17T18:47:18Z</updated>
	<author>
		<name>Greg Sabino Mullane</name>
	</author>
	<content type="html">&lt;br&gt;-----BEGIN PGP SIGNED MESSAGE----- &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;Hash: RIPEMD160
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; One concern I have about these trigger based replication systems is
&lt;br&gt;&amp;gt; that I fear it may ping the slave for each and every DML statement
&lt;br&gt;&amp;gt; separately in time and in a transaction. &amp;nbsp;My slave will literally be
&lt;br&gt;&amp;gt; 1400 miles away and all replication communications will be over the
&lt;br&gt;&amp;gt; net. &amp;nbsp;If I have a transaction which has 1000 DML statements in it, is
&lt;br&gt;&amp;gt; this thing going to update the slave 1000 times separately over the
&lt;br&gt;&amp;gt; net ? (I may not live long enough to see it finish) &amp;nbsp;Or will it be
&lt;br&gt;&amp;gt; smart enough to wait until I &amp;quot;commit&amp;quot; then send over a single bundle
&lt;br&gt;&amp;gt; of 1000 DML? &amp;nbsp;The time diff will be more than significant.
&lt;br&gt;&lt;br&gt;Both Slony and Bucardo are transaction based, meaning all 1000 changes
&lt;br&gt;will happen at once, and only when the transaction has committed. In
&lt;br&gt;practice, you'll find that both are surprisingly quick.
&lt;br&gt;&lt;br&gt;With Bucardo, the number of changes may be much less than 1000, as it
&lt;br&gt;is data based, not statement based. Thus, as an extreme example, if
&lt;br&gt;the 1000 statements are all updating a single row, only a single
&lt;br&gt;update (actually a delete/insert) is done on the slave.
&lt;br&gt;&lt;br&gt;- --
&lt;br&gt;Greg Sabino Mullane &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838384&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;greg@...&lt;/a&gt;
&lt;br&gt;End Point Corporation &lt;a href=&quot;http://www.endpoint.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.endpoint.com/&lt;/a&gt;&lt;br&gt;PGP Key: 0x14964AC8 200912172144
&lt;br&gt;&lt;a href=&quot;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&lt;/a&gt;&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;iEYEAREDAAYFAksq7RMACgkQvJuQZxSWSsgvNQCg0Og/Ilg7rO9UjBecCTVwf04x
&lt;br&gt;E1cAn05wdiJSh+VN3XpZrsFhNJYUTYjG
&lt;br&gt;=VLf6
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838384&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26838384.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838337</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T18:40:39Z</published>
	<updated>2009-12-17T18:40:39Z</updated>
	<author>
		<name>Scott Marlowe-2</name>
	</author>
	<content type="html">I would recommend using a traffic shaping router (like the one built
&lt;br&gt;into the linux kernel and controlled by tc / iptables) to simulate a
&lt;br&gt;long distance connection and testing this yourself to see which
&lt;br&gt;replication engine will work best for you.
&lt;br&gt;&lt;br&gt;On Thu, Dec 17, 2009 at 7:35 PM, Gauthier, Dave &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dave.gauthier@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; One concern I have about these trigger based replication systems is that I
&lt;br&gt;&amp;gt; fear it may ping the slave for each and every DML statement separately in
&lt;br&gt;&amp;gt; time and in a transaction.  My slave will literally be 1400 miles away and
&lt;br&gt;&amp;gt; all replication communications will be over the net.  If I have a
&lt;br&gt;&amp;gt; transaction which has 1000 DML statements in it, is this thing going to
&lt;br&gt;&amp;gt; update the slave 1000 times separately over the net ? (I may not live long
&lt;br&gt;&amp;gt; enough to see it finish)  Or will it be smart enough to wait until I
&lt;br&gt;&amp;gt; &amp;quot;commit&amp;quot; then send over a single bundle of 1000 DML?  The time diff will be
&lt;br&gt;&amp;gt; more than significant.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for all the great input on this!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general-owner@...&lt;/a&gt;
&lt;br&gt;&amp;gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general-owner@...&lt;/a&gt;] On Behalf Of Greg Sabino Mullane
&lt;br&gt;&amp;gt; Sent: Thursday, December 17, 2009 11:58 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [GENERAL] Justifying a PG over MySQL approach to a project
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;&amp;gt; Hash: RIPEMD160
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; How difficult is it to switch the master's hat from one DB instance
&lt;br&gt;&amp;gt;&amp;gt; to another?  Let's say the master in a master-slave scenario goes
&lt;br&gt;&amp;gt;&amp;gt; down but the slave is fine.  Can I designate the slave as being the
&lt;br&gt;&amp;gt;&amp;gt; new master, use it for read/write, and then just call the broken
&lt;br&gt;&amp;gt;&amp;gt; master the new slave once it comes back to life (something like that)?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sure. Bucardo slaves are not changed at all, so they are already
&lt;br&gt;&amp;gt; read/write and don't need anything special done to &amp;quot;unslave&amp;quot; them.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; One possible way to handle the scenario is:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Assuming three servers:
&lt;br&gt;&amp;gt; * A (master) sends changes to B, receives read/write queries
&lt;br&gt;&amp;gt; * B (slave) has transaction_read_only set to true, receives read queries
&lt;br&gt;&amp;gt; * C has the Bucardo database and daemon
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Box A goes down suddenly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; * Stop Bucardo on box C
&lt;br&gt;&amp;gt; * Flip the boxes around in the bucardo.db table
&lt;br&gt;&amp;gt; * Do a 'bucardo_ctl validate sync all'
&lt;br&gt;&amp;gt;   (This will create the needed triggers on B)
&lt;br&gt;&amp;gt; * Set B's transaction_read_only to false
&lt;br&gt;&amp;gt; * Point your apps at B instead of A for read/write queries
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When A comes back up:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; * DROP SCHEMA bucardo CASCADE; (drops all triggers)
&lt;br&gt;&amp;gt; * Set transaction_read_only to true
&lt;br&gt;&amp;gt; * Start Bucardo on C
&lt;br&gt;&amp;gt; * Once caught up, point read-only queries to A
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you are in a rush, you point things to B immediately after A fails,
&lt;br&gt;&amp;gt; but you'll have to recopy the entire table data to the slave, as the
&lt;br&gt;&amp;gt; triggers won't be in place yet.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - --
&lt;br&gt;&amp;gt; Greg Sabino Mullane &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;greg@...&lt;/a&gt;
&lt;br&gt;&amp;gt; End Point Corporation &lt;a href=&quot;http://www.endpoint.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.endpoint.com/&lt;/a&gt;&lt;br&gt;&amp;gt; PGP Key: 0x14964AC8 200912171153
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&lt;/a&gt;&lt;br&gt;&amp;gt; -----BEGIN PGP SIGNATURE-----
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; iEYEAREDAAYFAksqYqUACgkQvJuQZxSWSsjZtQCfTwbI3f9W0z+82IU7lL+2LwNK
&lt;br&gt;&amp;gt; aUYAnj3AMjRDOeFIuHDee4JJemneArie
&lt;br&gt;&amp;gt; =75Ho
&lt;br&gt;&amp;gt; -----END PGP SIGNATURE-----
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;&amp;gt; To make changes to your subscription:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;When fascism comes to America, it will be intolerance sold as diversity.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838337&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26838337.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838321</id>
	<title>Re: pg_dump and ON DELETE CASCADE problem</title>
	<published>2009-12-17T18:39:45Z</published>
	<updated>2009-12-17T18:39:45Z</updated>
	<author>
		<name>iamchris</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;--- On Thu, 12/17/09, Adrian Klaver &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838321&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aklaver@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Would it be possible to see the table schemas and indices
&lt;br&gt;&amp;gt; ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&lt;br&gt;Sure (you asked for it!!) :
&lt;br&gt;&lt;br&gt;CREATE TABLE packet
&lt;br&gt;(
&lt;br&gt;&amp;nbsp; id integer NOT NULL DEFAULT nextval('packet_id_seq'::regclass),
&lt;br&gt;&amp;nbsp; packet_uuid uniqueidentifier NOT NULL DEFAULT newid(),
&lt;br&gt;&amp;nbsp; username character varying(50) NOT NULL DEFAULT ''::character varying,
&lt;br&gt;&amp;nbsp; pgroup_uuid uniqueidentifier DEFAULT newid(),
&lt;br&gt;&amp;nbsp; orig_trans_uuid uniqueidentifier,
&lt;br&gt;&amp;nbsp; user_reference_id character varying(50) DEFAULT ''::character varying,
&lt;br&gt;&amp;nbsp; trans_data character varying(100) NOT NULL DEFAULT ''::character varying,
&lt;br&gt;&amp;nbsp; trans_type character varying(50) NOT NULL DEFAULT 'unknown'::character varying,
&lt;br&gt;&amp;nbsp; trans_date timestamp with time zone DEFAULT ('now'::text)::timestamp(6) with time zone,
&lt;br&gt;&amp;nbsp; processor character varying(10),
&lt;br&gt;&amp;nbsp; service character varying(10),
&lt;br&gt;&amp;nbsp; CONSTRAINT packet_pkey PRIMARY KEY (id)
&lt;br&gt;)
&lt;br&gt;WITH (
&lt;br&gt;&amp;nbsp; OIDS=TRUE
&lt;br&gt;);
&lt;br&gt;ALTER TABLE packet OWNER TO postgres;
&lt;br&gt;GRANT ALL ON TABLE packet TO postgres;
&lt;br&gt;GRANT ALL ON TABLE packet TO adduser;
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_otuuid_idx
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING btree
&lt;br&gt;&amp;nbsp; (orig_trans_uuid);
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_pgroup_uuid_idx
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING btree
&lt;br&gt;&amp;nbsp; (pgroup_uuid);
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_puuid_hash_uniq
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING hash
&lt;br&gt;&amp;nbsp; (packet_uuid);
&lt;br&gt;&lt;br&gt;CREATE UNIQUE INDEX packet_puuid_idx
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING btree
&lt;br&gt;&amp;nbsp; (packet_uuid);
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_trans_date_idx
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING btree
&lt;br&gt;&amp;nbsp; (trans_date);
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_user_idx
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING btree
&lt;br&gt;&amp;nbsp; (username);
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_user_puuid_idx
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; USING btree
&lt;br&gt;&amp;nbsp; (username, packet_uuid);
&lt;br&gt;&lt;br&gt;CREATE OR REPLACE RULE packet_delete_rule AS
&lt;br&gt;&amp;nbsp; &amp;nbsp; ON DELETE TO packet DO &amp;nbsp;INSERT INTO removed_packet (id, packet_uuid, username, pgroup_uuid, orig_trans_uuid, user_reference_id, trans_data, trans_type, trans_date, processor, service) &amp;nbsp;SELECT packet.id, packet.packet_uuid, packet.username, packet.pgroup_uuid, packet.orig_trans_uuid, packet.user_reference_id, packet.trans_data, packet.trans_type, packet.trans_date, packet.processor, packet.service
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM packet
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE packet.id = old.id;
&lt;br&gt;&lt;br&gt;CREATE TRIGGER packet_count_delete_trig
&lt;br&gt;&amp;nbsp; BEFORE DELETE
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; FOR EACH ROW
&lt;br&gt;&amp;nbsp; EXECUTE PROCEDURE letter_count_trig();
&lt;br&gt;&lt;br&gt;CREATE TRIGGER packet_count_insert_trig
&lt;br&gt;&amp;nbsp; AFTER INSERT
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; FOR EACH ROW
&lt;br&gt;&amp;nbsp; EXECUTE PROCEDURE letter_count_trig();
&lt;br&gt;&lt;br&gt;CREATE TRIGGER packet_delete_trig
&lt;br&gt;&amp;nbsp; BEFORE DELETE
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; FOR EACH ROW
&lt;br&gt;&amp;nbsp; EXECUTE PROCEDURE packet_datalink_status_trig();
&lt;br&gt;&lt;br&gt;CREATE TRIGGER packet_insert_trig
&lt;br&gt;&amp;nbsp; AFTER INSERT
&lt;br&gt;&amp;nbsp; ON packet
&lt;br&gt;&amp;nbsp; FOR EACH ROW
&lt;br&gt;&amp;nbsp; EXECUTE PROCEDURE packet_ins_trig();
&lt;br&gt;&lt;br&gt;CREATE TABLE dpo.packet_search_trigram
&lt;br&gt;(
&lt;br&gt;&amp;nbsp; id integer NOT NULL DEFAULT nextval('packet_search_trigram_id_seq'::regclass),
&lt;br&gt;&amp;nbsp; packet_uuid uniqueidentifier NOT NULL,
&lt;br&gt;&amp;nbsp; trigram_vector tsvector NOT NULL,
&lt;br&gt;&amp;nbsp; CONSTRAINT packet_search_trigram_id_pkey PRIMARY KEY (id),
&lt;br&gt;&amp;nbsp; CONSTRAINT packet_search_trigram_puuid_fkey FOREIGN KEY (packet_uuid)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; REFERENCES dpo.packet (packet_uuid) MATCH SIMPLE
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ON UPDATE CASCADE ON DELETE CASCADE
&lt;br&gt;)
&lt;br&gt;WITH (
&lt;br&gt;&amp;nbsp; OIDS=FALSE
&lt;br&gt;);
&lt;br&gt;ALTER TABLE dpo.packet_search_trigram OWNER TO postgres;
&lt;br&gt;GRANT ALL ON TABLE dpo.packet_search_trigram TO postgres WITH GRANT OPTION;
&lt;br&gt;GRANT ALL ON TABLE dpo.packet_search_trigram TO addgroup;
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_search_trigram_packet_uuid_idx
&lt;br&gt;&amp;nbsp; ON dpo.packet_search_trigram
&lt;br&gt;&amp;nbsp; USING hash
&lt;br&gt;&amp;nbsp; (packet_uuid);
&lt;br&gt;&lt;br&gt;CREATE INDEX packet_search_trigram_trigram_vector_idx
&lt;br&gt;&amp;nbsp; ON dpo.packet_search_trigram
&lt;br&gt;&amp;nbsp; USING gin
&lt;br&gt;&amp;nbsp; (trigram_vector);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838321&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pg_dump-and-ON-DELETE-CASCADE-problem-tp26716347p26838321.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838298</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T18:35:35Z</published>
	<updated>2009-12-17T18:35:35Z</updated>
	<author>
		<name>Gauthier, Dave</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Exchange Server&quot;&gt;
&lt;!-- converted from rtf --&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;font face=&quot;Courier New, monospace&quot; size=&quot;2&quot;&gt;
&lt;div&gt;One concern I have about these trigger based replication systems is that I fear it may ping the slave for each and every DML statement separately in time and in a transaction.&amp;nbsp; My slave will literally be 1400 miles away and all replication communications
will be over the net.&amp;nbsp; If I have a transaction which has 1000 DML statements in it, is this thing going to update the slave 1000 times separately over the net ? (I may not live long enough to see it finish)&amp;nbsp; Or will it be smart enough to wait until I &amp;quot;commit&amp;quot;
then send over a single bundle of 1000 DML?&amp;nbsp; The time diff will be more than significant.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Thanks for all the great input on this!&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;-----Original Message-----&lt;br&gt;

From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838298&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general-owner@...&lt;/a&gt; [&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838298&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general-owner@...&lt;/a&gt;] On Behalf Of Greg Sabino Mullane&lt;br&gt;

Sent: Thursday, December 17, 2009 11:58 AM&lt;br&gt;

To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838298&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;&lt;br&gt;

Subject: Re: [GENERAL] Justifying a PG over MySQL approach to a project&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;-----BEGIN PGP SIGNED MESSAGE-----&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; &lt;/div&gt;
&lt;div&gt;Hash: RIPEMD160&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;&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;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;gt; How difficult is it to switch the master's hat from one DB instance &lt;/div&gt;
&lt;div&gt;&amp;gt; to another?&amp;nbsp; Let's say the master in a master-slave scenario goes&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div&gt;&amp;gt; down but the slave is fine.&amp;nbsp; Can I designate the slave as being the &lt;/div&gt;
&lt;div&gt;&amp;gt; new master, use it for read/write, and then just call the broken&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div&gt;&amp;gt; master the new slave once it comes back to life (something like that)?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Sure. Bucardo slaves are not changed at all, so they are already &lt;/div&gt;
&lt;div&gt;read/write and don't need anything special done to &amp;quot;unslave&amp;quot; them.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;One possible way to handle the scenario is:&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Assuming three servers:&lt;/div&gt;
&lt;div&gt;* A (master) sends changes to B, receives read/write queries&lt;/div&gt;
&lt;div&gt;* B (slave) has transaction_read_only set to true, receives read queries&lt;/div&gt;
&lt;div&gt;* C has the Bucardo database and daemon&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Box A goes down suddenly.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;* Stop Bucardo on box C&lt;/div&gt;
&lt;div&gt;* Flip the boxes around in the bucardo.db table&lt;/div&gt;
&lt;div&gt;* Do a 'bucardo_ctl validate sync all'&lt;/div&gt;
&lt;div&gt;&amp;nbsp; (This will create the needed triggers on B)&lt;/div&gt;
&lt;div&gt;* Set B's transaction_read_only to false&lt;/div&gt;
&lt;div&gt;* Point your apps at B instead of A for read/write queries&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;When A comes back up:&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;* DROP SCHEMA bucardo CASCADE; (drops all triggers)&lt;/div&gt;
&lt;div&gt;* Set transaction_read_only to true&lt;/div&gt;
&lt;div&gt;* Start Bucardo on C&lt;/div&gt;
&lt;div&gt;* Once caught up, point read-only queries to A&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;If you are in a rush, you point things to B immediately after A fails,&lt;/div&gt;
&lt;div&gt;but you'll have to recopy the entire table data to the slave, as the&lt;/div&gt;
&lt;div&gt;triggers won't be in place yet.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;- --&lt;/div&gt;
&lt;div&gt;Greg Sabino Mullane &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838298&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;greg@...&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;End Point Corporation &lt;a href=&quot;http://www.endpoint.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.endpoint.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;PGP Key: 0x14964AC8 200912171153&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;-----BEGIN PGP SIGNATURE-----&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;iEYEAREDAAYFAksqYqUACgkQvJuQZxSWSsjZtQCfTwbI3f9W0z&amp;#43;82IU7lL&amp;#43;2LwNK&lt;/div&gt;
&lt;div&gt;aUYAnj3AMjRDOeFIuHDee4JJemneArie&lt;/div&gt;
&lt;div&gt;=75Ho&lt;/div&gt;
&lt;div&gt;-----END PGP SIGNATURE-----&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;-- &lt;/div&gt;
&lt;div&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838298&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;To make changes to your subscription:&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;/font&gt;
&lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26838298.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838180</id>
	<title>Re: Server Requirements</title>
	<published>2009-12-17T18:16:15Z</published>
	<updated>2009-12-17T18:16:15Z</updated>
	<author>
		<name>Scott Marlowe-2</name>
	</author>
	<content type="html">On Wed, Dec 16, 2009 at 4:21 PM, Christine Penner
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838180&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christine@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If we have clients that are going to buy new computers or upgrade current
&lt;br&gt;&amp;gt; ones, what we can recommend to them for optimal system performance to run
&lt;br&gt;&amp;gt; Postgres. These can be servers or desktop PCs. We can have from 1-10 users
&lt;br&gt;&amp;gt; in at a time. At this point all of our database's are small but that can
&lt;br&gt;&amp;gt; change of course.
&lt;br&gt;&lt;br&gt;Like Craig said, your description is pretty vague, so it's hard to say
&lt;br&gt;what you need most to make your pgsql server run fast.
&lt;br&gt;&lt;br&gt;Generally, the order of things to do to make it fast are: &amp;nbsp;Add memory,
&lt;br&gt;add hard drives, add battery backed caching RAID controllers, add more
&lt;br&gt;CPU horsepower.
&lt;br&gt;&lt;br&gt;But it depends largely on your usage patterns. &amp;nbsp;So, what are you doing
&lt;br&gt;with your db?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838180&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Server-Requirements-tp26821270p26838180.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26838122</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T18:06:35Z</published>
	<updated>2009-12-17T18:06:35Z</updated>
	<author>
		<name>Scott Marlowe-2</name>
	</author>
	<content type="html">On Thu, Dec 17, 2009 at 12:35 PM, Madison Kelly &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838122&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;linux@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Gauthier, Dave wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi Everyone:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Tomorrow, I will need to present to a group of managers (who know nothing
&lt;br&gt;&amp;gt;&amp;gt; about DBs) why I chose to use PG over MySQL in a project, MySQL being the
&lt;br&gt;&amp;gt;&amp;gt; more popular DB choice with other engineers, and managers fearing things
&lt;br&gt;&amp;gt;&amp;gt; that are “different” (risk).  I have a few hard tecnical reasons (check
&lt;br&gt;&amp;gt;&amp;gt; constraint, deferred constraint checking, array data type), but I’m looking
&lt;br&gt;&amp;gt;&amp;gt; for a “it’s more reliable” reasons.  Again, the audience is managers.  Is
&lt;br&gt;&amp;gt;&amp;gt; there an impartial,  3^rd party evaluation of the 2 DBs out there that
&lt;br&gt;&amp;gt;&amp;gt; identifies PG as being more reliable?  It might mention things like fewer
&lt;br&gt;&amp;gt;&amp;gt; incidences of corrupt tables/indexes, fewer deamon crashes, better recovery
&lt;br&gt;&amp;gt;&amp;gt; after system crashes, etc... ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks !
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There is a current question about the survivability of MySQL right now with
&lt;br&gt;&amp;gt; the potential sale of MySQL. I would not bank on MySQL for any long-term
&lt;br&gt;&amp;gt; project. I am sure that MySQL will live in the long run, but they may well
&lt;br&gt;&amp;gt; be turbulent times ahead if whomever comes to own MySQL decides to neglect
&lt;br&gt;&amp;gt; or kill it and the source gets forked.
&lt;/div&gt;&lt;br&gt;It's important to separate out MySQL AB the company, owned by Sun,
&lt;br&gt;soon to be owned by Oracle, from MySQL the GPL licensed database,
&lt;br&gt;which may or may not allow you to distribute your own commercial code
&lt;br&gt;without buying a license. &amp;nbsp;Given the OSS License loophole, and the
&lt;br&gt;fact that many of those OSS licenses do NOT require the release of
&lt;br&gt;source code, there's every possibiliy you could release your
&lt;br&gt;commercial code under the BSD code to yourself, and then give only the
&lt;br&gt;compiled code to customers and you'd technically be safe distributing
&lt;br&gt;MySQL with it.
&lt;br&gt;&lt;br&gt;There are several companies in the MySQL biosphere that are releasing
&lt;br&gt;their own forks of MySQL with lots of bug fixes, and I have no doubt
&lt;br&gt;that MySQL the GPL database will continue to be available as a GPL
&lt;br&gt;product for quite some time. &amp;nbsp;However, the availability of
&lt;br&gt;commercially licensed MySQL may or may not continue based on the
&lt;br&gt;business needs of Oracle.
&lt;br&gt;&lt;br&gt;For in house use only, this is a non-issue, as the GPL only affects
&lt;br&gt;distribution of MySQL, not internal usage.
&lt;br&gt;&lt;br&gt;The biggest argument I'd use against MySQL in general is that
&lt;br&gt;PostgreSQL is a better database for any time your data and its
&lt;br&gt;integrity are important.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26838122&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26838122.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26837824</id>
	<title>Re: Extended Query using the Frontend/Backend Protocol 3.0</title>
	<published>2009-12-17T17:26:21Z</published>
	<updated>2009-12-17T17:26:21Z</updated>
	<author>
		<name>John DeSoi</name>
	</author>
	<content type="html">&lt;br&gt;On Dec 17, 2009, at 11:13 AM, Raimon Fernandez wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I'm trying to integrate the extended query protocol with my libraries.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm sending a simple SELECT to validate the method, but I'm getting an Invalid Message Format.
&lt;br&gt;&lt;br&gt;I did not add up your byte count, but maybe this will help:
&lt;br&gt;&lt;br&gt;&lt;br&gt;(write-byte p stream)
&lt;br&gt;(write-int32 (+ int32-length (length name) 1 (length sql-string) 1 int16-length (* int32-length param-count)) stream) 
&lt;br&gt;(write-cstring name stream)
&lt;br&gt;(write-cstring sql-string stream)
&lt;br&gt;(write-int16 param-count stream)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;John DeSoi, Ph.D.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26837824&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Implementing-Frontend-Backend-Protocol-TCP-IP-tp26069106p26837824.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26837037</id>
	<title>Re: alter table performance</title>
	<published>2009-12-17T15:49:08Z</published>
	<updated>2009-12-17T15:49:08Z</updated>
	<author>
		<name>Antonio Goméz Soto</name>
	</author>
	<content type="html">Op 17-12-09 23:46, Tom Lane schreef:
&lt;br&gt;&amp;gt; This is just one of many many things that could be improved by getting
&lt;br&gt;&amp;gt; off of 7.3. &amp;nbsp;In general, complaining about performance (or features)
&lt;br&gt;&amp;gt; of a seven-year-old, long since EOL'd release is not a productive use of
&lt;br&gt;&amp;gt; anybody's time.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&lt;br&gt;I'm sorry, didn't mean to.
&lt;br&gt;&lt;br&gt;I was just checking if I did it the right way, or if it was supposed to 
&lt;br&gt;be that slow.
&lt;br&gt;&lt;br&gt;I know we should upgrade the client machines, but in some cases we just 
&lt;br&gt;can't.
&lt;br&gt;&lt;br&gt;Anyway, thanks for giving me the answer.
&lt;br&gt;&lt;br&gt;Antonio
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26837037&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/alter-table-performance-tp26835962p26837037.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836944</id>
	<title>Re: Table Partitioning Advice Request</title>
	<published>2009-12-17T15:41:04Z</published>
	<updated>2009-12-17T15:41:04Z</updated>
	<author>
		<name>Scott Marlowe-2</name>
	</author>
	<content type="html">On Thu, Dec 17, 2009 at 8:29 AM, Vincenzo Romano
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836944&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;vincenzo.romano@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 2009/12/17 Sam Jas &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836944&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;samjas33@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Rule is not advisable, Trigger is the best solution.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Does the trigger solution need the TABLE CHECK constraint?
&lt;br&gt;&amp;gt; It looks to me it won't.
&lt;br&gt;&lt;br&gt;The table check constraint is used during selects to pick just the
&lt;br&gt;child tables needed to deliver the data you are asking for, assuming
&lt;br&gt;the key value is in the where clause.
&lt;br&gt;&lt;br&gt;The main reason to avoid rules is that they're much less efficient
&lt;br&gt;than triggers. &amp;nbsp;We use partitioning at work for our stats db, and
&lt;br&gt;partition by day, and we have about 2 years worth of stats data, so
&lt;br&gt;our insert trigger has about 700 if / elseif / else conditions in it,
&lt;br&gt;and the trigger is still very very fast. &amp;nbsp;I tried it with rules before
&lt;br&gt;and it was way too slow.
&lt;br&gt;&lt;br&gt;Note that the absolute fastest way to insert to the right child table
&lt;br&gt;is to do it from the application side, choosing the right child table
&lt;br&gt;there.
&lt;br&gt;&lt;br&gt;We automated our trigger creation. &amp;nbsp;While the trigger is huge in terms
&lt;br&gt;of number of lines, speed wise the creation of the new trigger each
&lt;br&gt;night at midnight is measured in milliseconds
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836944&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Table-Partitioning-Advice-Request-tp26827122p26836944.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836927</id>
	<title>Re: Installing PL/pgSQL by default</title>
	<published>2009-12-17T15:39:55Z</published>
	<updated>2009-12-17T15:39:55Z</updated>
	<author>
		<name>Bruce Momjian-5</name>
	</author>
	<content type="html">Bruce Momjian wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Tom Lane wrote:
&lt;br&gt;&amp;gt; &amp;gt; Bruce Momjian &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836927&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruce@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I installed PL/pgSQL by default via initdb with the attached patch. &amp;nbsp;The
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; only problem is that pg_dump still dumps out the language creation:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 	CREATE PROCEDURAL LANGUAGE plpgsql;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 	ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; What is odd is that I used the same process that initdb uses to create
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; other objects. &amp;nbsp;Does anyone know why this is happening?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I think pg_dump pays attention to what schema the objects are in,
&lt;br&gt;&amp;gt; &amp;gt; and that's most likely creating them in PUBLIC. &amp;nbsp;Try adding
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;set search_path = pg_catalog&amp;quot;.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; It's not impossible that we'll have to tweak pg_dump a bit; it's
&lt;br&gt;&amp;gt; &amp;gt; never had to deal with languages that shouldn't be dumped ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I found that pg_dump tests for pg_language.lanispl == true, which is
&lt;br&gt;&amp;gt; true for all the stored procedure languages. &amp;nbsp;I can easily special case
&lt;br&gt;&amp;gt; plpgsql, or check for FirstNormalObjectId, though I don't see that used
&lt;br&gt;&amp;gt; in pg_dump currently.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; A more difficult issue is whether we should preserve the fact that
&lt;br&gt;&amp;gt; plpgsql was _removed_ in the pg_dump output, i.e, if someone removes
&lt;br&gt;&amp;gt; plpgsql from a database, do we issue a DROP LANGUAGE in pg_dump? &amp;nbsp;I
&lt;br&gt;&amp;gt; don't remember us having to deal with anything like this before.
&lt;/div&gt;&lt;/div&gt;OK, the attached patch installs plpgsql by default from initdb, and
&lt;br&gt;supresses the dumping of CREATE LANGUAGE in 8.5 and in 8.3/8.4 if binary
&lt;br&gt;upgrade is used (because you know you are upgrading to a release that
&lt;br&gt;has plpgsql installed by default). &amp;nbsp;The 8.3/8.4 is necessary so the
&lt;br&gt;schema load doesn't generate any errors and cause pg_migrator to exit.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; Bruce Momjian &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836927&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruce@...&lt;/a&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://momjian.us&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://momjian.us&lt;/a&gt;&lt;br&gt;&amp;nbsp; EnterpriseDB &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;a href=&quot;http://enterprisedb.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enterprisedb.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; + If your life is a hard drive, Christ can be your backup. +
&lt;br&gt;&lt;br /&gt;Index: doc/src/sgml/installation.sgml
&lt;br&gt;===================================================================
&lt;br&gt;RCS file: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v
&lt;br&gt;retrieving revision 1.333
&lt;br&gt;diff -c -c -r1.333 installation.sgml
&lt;br&gt;*** doc/src/sgml/installation.sgml	15 Dec 2009 22:59:53 -0000	1.333
&lt;br&gt;--- doc/src/sgml/installation.sgml	17 Dec 2009 23:35:36 -0000
&lt;br&gt;***************
&lt;br&gt;*** 2266,2279 ****
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;is &amp;lt;command&amp;gt;createlang&amp;lt;/command&amp;gt; failing with unusual errors.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For example, running as the owner of the PostgreSQL installation:
&lt;br&gt;&amp;nbsp; &amp;lt;screen&amp;gt;
&lt;br&gt;! -bash-3.00$ createlang plpgsql template1
&lt;br&gt;! createlang: language installation failed: ERROR: &amp;nbsp;could not load library &amp;quot;/opt/dbs/pgsql748/lib/plpgsql.so&amp;quot;: A memory address is not in the address space for the process.
&lt;br&gt;&amp;nbsp; &amp;lt;/screen&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Running as a non-owner in the group posessing the PostgreSQL
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; installation:
&lt;br&gt;&amp;nbsp; &amp;lt;screen&amp;gt;
&lt;br&gt;! -bash-3.00$ createlang plpgsql template1
&lt;br&gt;! createlang: language installation failed: ERROR: &amp;nbsp;could not load library &amp;quot;/opt/dbs/pgsql748/lib/plpgsql.so&amp;quot;: Bad address
&lt;br&gt;&amp;nbsp; &amp;lt;/screen&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Another example is out of memory errors in the PostgreSQL server
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logs, with every memory allocation near or greater than 256 MB
&lt;br&gt;--- 2266,2279 ----
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;is &amp;lt;command&amp;gt;createlang&amp;lt;/command&amp;gt; failing with unusual errors.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For example, running as the owner of the PostgreSQL installation:
&lt;br&gt;&amp;nbsp; &amp;lt;screen&amp;gt;
&lt;br&gt;! -bash-3.00$ createlang plperl template1
&lt;br&gt;! createlang: language installation failed: ERROR: &amp;nbsp;could not load library &amp;quot;/opt/dbs/pgsql748/lib/plperl.so&amp;quot;: A memory address is not in the address space for the process.
&lt;br&gt;&amp;nbsp; &amp;lt;/screen&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Running as a non-owner in the group posessing the PostgreSQL
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; installation:
&lt;br&gt;&amp;nbsp; &amp;lt;screen&amp;gt;
&lt;br&gt;! -bash-3.00$ createlang plperl template1
&lt;br&gt;! createlang: language installation failed: ERROR: &amp;nbsp;could not load library &amp;quot;/opt/dbs/pgsql748/lib/plperl.so&amp;quot;: Bad address
&lt;br&gt;&amp;nbsp; &amp;lt;/screen&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Another example is out of memory errors in the PostgreSQL server
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logs, with every memory allocation near or greater than 256 MB
&lt;br&gt;Index: src/bin/initdb/initdb.c
&lt;br&gt;===================================================================
&lt;br&gt;RCS file: /cvsroot/pgsql/src/bin/initdb/initdb.c,v
&lt;br&gt;retrieving revision 1.178
&lt;br&gt;diff -c -c -r1.178 initdb.c
&lt;br&gt;*** src/bin/initdb/initdb.c	11 Dec 2009 03:34:56 -0000	1.178
&lt;br&gt;--- src/bin/initdb/initdb.c	17 Dec 2009 23:35:36 -0000
&lt;br&gt;***************
&lt;br&gt;*** 176,181 ****
&lt;br&gt;--- 176,182 ----
&lt;br&gt;&amp;nbsp; static void setup_privileges(void);
&lt;br&gt;&amp;nbsp; static void set_info_version(void);
&lt;br&gt;&amp;nbsp; static void setup_schema(void);
&lt;br&gt;+ static void load_plpgsql(void);
&lt;br&gt;&amp;nbsp; static void vacuum_db(void);
&lt;br&gt;&amp;nbsp; static void make_template0(void);
&lt;br&gt;&amp;nbsp; static void make_postgres(void);
&lt;br&gt;***************
&lt;br&gt;*** 1894,1899 ****
&lt;br&gt;--- 1895,1925 ----
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; /*
&lt;br&gt;+ &amp;nbsp;* load PL/pgsql server-side language
&lt;br&gt;+ &amp;nbsp;*/
&lt;br&gt;+ static void
&lt;br&gt;+ load_plpgsql(void)
&lt;br&gt;+ {
&lt;br&gt;+ 	PG_CMD_DECL;
&lt;br&gt;+ 
&lt;br&gt;+ 	fputs(_(&amp;quot;loading PL/pgSQL server-side language ... &amp;quot;), stdout);
&lt;br&gt;+ 	fflush(stdout);
&lt;br&gt;+ 
&lt;br&gt;+ 	snprintf(cmd, sizeof(cmd),
&lt;br&gt;+ 			 &amp;quot;\&amp;quot;%s\&amp;quot; %s template1 &amp;gt;%s&amp;quot;,
&lt;br&gt;+ 			 backend_exec, backend_options,
&lt;br&gt;+ 			 DEVNULL);
&lt;br&gt;+ 
&lt;br&gt;+ 	PG_CMD_OPEN;
&lt;br&gt;+ 
&lt;br&gt;+ 	PG_CMD_PUTS(&amp;quot;CREATE LANGUAGE plpgsql;\n&amp;quot;);
&lt;br&gt;+ 
&lt;br&gt;+ 	PG_CMD_CLOSE;
&lt;br&gt;+ 
&lt;br&gt;+ 	check_ok();
&lt;br&gt;+ }
&lt;br&gt;+ 
&lt;br&gt;+ /*
&lt;br&gt;&amp;nbsp; &amp;nbsp;* clean everything up in template1
&lt;br&gt;&amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; static void
&lt;br&gt;***************
&lt;br&gt;*** 3126,3131 ****
&lt;br&gt;--- 3152,3159 ----
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; 	setup_schema();
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;+ 	load_plpgsql();
&lt;br&gt;+ 
&lt;br&gt;&amp;nbsp; 	vacuum_db();
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; 	make_template0();
&lt;br&gt;Index: src/bin/pg_dump/pg_dump.c
&lt;br&gt;===================================================================
&lt;br&gt;RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v
&lt;br&gt;retrieving revision 1.556
&lt;br&gt;diff -c -c -r1.556 pg_dump.c
&lt;br&gt;*** src/bin/pg_dump/pg_dump.c	14 Dec 2009 00:39:11 -0000	1.556
&lt;br&gt;--- src/bin/pg_dump/pg_dump.c	17 Dec 2009 23:35:36 -0000
&lt;br&gt;***************
&lt;br&gt;*** 32,37 ****
&lt;br&gt;--- 32,38 ----
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; #include &amp;quot;access/attnum.h&amp;quot;
&lt;br&gt;&amp;nbsp; #include &amp;quot;access/sysattr.h&amp;quot;
&lt;br&gt;+ #include &amp;quot;access/transam.h&amp;quot;
&lt;br&gt;&amp;nbsp; #include &amp;quot;catalog/pg_cast.h&amp;quot;
&lt;br&gt;&amp;nbsp; #include &amp;quot;catalog/pg_class.h&amp;quot;
&lt;br&gt;&amp;nbsp; #include &amp;quot;catalog/pg_default_acl.h&amp;quot;
&lt;br&gt;***************
&lt;br&gt;*** 4599,4606 ****
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;(%s lanowner) AS lanowner &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;FROM pg_language &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;WHERE lanispl &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;ORDER BY oid&amp;quot;,
&lt;br&gt;! 						 &amp;nbsp;username_subquery);
&lt;br&gt;&amp;nbsp; 	}
&lt;br&gt;&amp;nbsp; 	else if (g_fout-&amp;gt;remoteVersion &amp;gt;= 80300)
&lt;br&gt;&amp;nbsp; 	{
&lt;br&gt;--- 4600,4609 ----
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;(%s lanowner) AS lanowner &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;FROM pg_language &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;WHERE lanispl &amp;quot;
&lt;br&gt;+ 						 &amp;nbsp;/* do not dump initdb-installed languages */
&lt;br&gt;+ 						 &amp;nbsp;&amp;quot;AND oid &amp;gt;= %u &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;ORDER BY oid&amp;quot;,
&lt;br&gt;! 						 &amp;nbsp;username_subquery, FirstNormalObjectId);
&lt;br&gt;&amp;nbsp; 	}
&lt;br&gt;&amp;nbsp; 	else if (g_fout-&amp;gt;remoteVersion &amp;gt;= 80300)
&lt;br&gt;&amp;nbsp; 	{
&lt;br&gt;***************
&lt;br&gt;*** 4610,4618 ****
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;lanvalidator, &amp;nbsp;lanacl, &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;(%s lanowner) AS lanowner &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;FROM pg_language &amp;quot;
&lt;br&gt;! 						 &amp;nbsp;&amp;quot;WHERE lanispl &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;ORDER BY oid&amp;quot;,
&lt;br&gt;! 						 &amp;nbsp;username_subquery);
&lt;br&gt;&amp;nbsp; 	}
&lt;br&gt;&amp;nbsp; 	else if (g_fout-&amp;gt;remoteVersion &amp;gt;= 80100)
&lt;br&gt;&amp;nbsp; 	{
&lt;br&gt;--- 4613,4622 ----
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;lanvalidator, &amp;nbsp;lanacl, &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;(%s lanowner) AS lanowner &amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;FROM pg_language &amp;quot;
&lt;br&gt;! 						 &amp;nbsp;&amp;quot;WHERE lanispl%s&amp;quot;
&lt;br&gt;&amp;nbsp; 						 &amp;nbsp;&amp;quot;ORDER BY oid&amp;quot;,
&lt;br&gt;! 						 &amp;nbsp;username_subquery,
&lt;br&gt;! 						 &amp;nbsp;binary_upgrade ? &amp;quot;\nAND lanname != 'plpgsql'&amp;quot; : &amp;quot;&amp;quot;);
&lt;br&gt;&amp;nbsp; 	}
&lt;br&gt;&amp;nbsp; 	else if (g_fout-&amp;gt;remoteVersion &amp;gt;= 80100)
&lt;br&gt;&amp;nbsp; 	{
&lt;br&gt;Index: src/test/regress/GNUmakefile
&lt;br&gt;===================================================================
&lt;br&gt;RCS file: /cvsroot/pgsql/src/test/regress/GNUmakefile,v
&lt;br&gt;retrieving revision 1.79
&lt;br&gt;diff -c -c -r1.79 GNUmakefile
&lt;br&gt;*** src/test/regress/GNUmakefile	26 Oct 2009 21:11:22 -0000	1.79
&lt;br&gt;--- src/test/regress/GNUmakefile	17 Dec 2009 23:35:38 -0000
&lt;br&gt;***************
&lt;br&gt;*** 138,144 ****
&lt;br&gt;&amp;nbsp; ## Run tests
&lt;br&gt;&amp;nbsp; ##
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;! pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; check: all
&lt;br&gt;&amp;nbsp; 	$(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF)
&lt;br&gt;--- 138,144 ----
&lt;br&gt;&amp;nbsp; ## Run tests
&lt;br&gt;&amp;nbsp; ##
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;! pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. --multibyte=$(MULTIBYTE) $(NOLOCALE)
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; check: all
&lt;br&gt;&amp;nbsp; 	$(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF)
&lt;br&gt;&lt;br /&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836927&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Updating-column-on-row-update-tp26468789p26836927.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836371</id>
	<title>Re: alter table performance</title>
	<published>2009-12-17T14:46:03Z</published>
	<updated>2009-12-17T14:46:03Z</updated>
	<author>
		<name>Tom Lane-2</name>
	</author>
	<content type="html">Thomas Kellerer &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836371&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;spam_eater@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; What's wrong with:
&lt;br&gt;&amp;gt; alter table person add column address varchar(64) not null default '';
&lt;br&gt;&lt;br&gt;This:
&lt;br&gt;&lt;br&gt;regression=# alter table person add column address varchar(64) not null default '';
&lt;br&gt;ERROR: &amp;nbsp;Adding columns with defaults is not implemented.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Add the column, then use ALTER TABLE SET DEFAULT.
&lt;br&gt;regression=# \q
&lt;br&gt;&lt;br&gt;This is just one of many many things that could be improved by getting
&lt;br&gt;off of 7.3. &amp;nbsp;In general, complaining about performance (or features)
&lt;br&gt;of a seven-year-old, long since EOL'd release is not a productive use of
&lt;br&gt;anybody's time.
&lt;br&gt;&lt;br&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; regards, tom lane
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836371&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/alter-table-performance-tp26835962p26836371.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836304</id>
	<title>Re: feature request: create table with unique constraint</title>
	<published>2009-12-17T14:39:39Z</published>
	<updated>2009-12-17T14:39:39Z</updated>
	<author>
		<name>Tom Lane-2</name>
	</author>
	<content type="html">&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836304&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wumpus@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; &amp;nbsp; , unique ( a_id , ( case when actual then 0 else id end ) )
&lt;br&gt;&lt;br&gt;&amp;gt; Why can i not define the unique constraint in the
&lt;br&gt;&amp;gt; create table?
&lt;br&gt;&lt;br&gt;The syntax for a unique constraint in CREATE TABLE is defined by the SQL
&lt;br&gt;standard, and it doesn't include expressions. &amp;nbsp;More than the syntax, a
&lt;br&gt;unique constraint also ought to show up in the information_schema views,
&lt;br&gt;and those don't have the ability to handle expressions. &amp;nbsp;So we have the
&lt;br&gt;capability, but it's only available via CREATE INDEX which is outside
&lt;br&gt;the standard.
&lt;br&gt;&lt;br&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; regards, tom lane
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836304&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/feature-request%3A-create-table-with-unique-constraint-tp26836163p26836304.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836292</id>
	<title>Re: pg_dump and ON DELETE CASCADE problem</title>
	<published>2009-12-17T14:39:20Z</published>
	<updated>2009-12-17T14:39:20Z</updated>
	<author>
		<name>Adrian Klaver</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;br&gt;----- &amp;quot;CG&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cgg007@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; --- On Tue, 12/15/09, Adrian Klaver &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aklaver@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; From: Adrian Klaver &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aklaver@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Subject: Re: [GENERAL] pg_dump and ON DELETE CASCADE problem
&lt;br&gt;&amp;gt; &amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cgg007@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; Cc: &amp;quot;postgresql listserv&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;&amp;gt;, &amp;quot;Craig
&lt;br&gt;&amp;gt; Ringer&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;craig@...&lt;/a&gt;&amp;gt;, &amp;quot;Scott Marlowe&amp;quot;
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;scott.marlowe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Date: Tuesday, December 15, 2009, 6:53 PM
&lt;br&gt;&amp;gt; &amp;gt; On Tuesday 15 December 2009 2:33:39
&lt;br&gt;&amp;gt; &amp;gt; pm CG wrote:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Bingo. Showed right up. I did a reindex, and now it
&lt;br&gt;&amp;gt; &amp;gt; shows up searching via
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; sequential scan or index scan.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; So that's pretty scary to have a corrupted index. Once
&lt;br&gt;&amp;gt; &amp;gt; I reindexed, I'm
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; able to see /a lot/ of data I couldn't before. This is
&lt;br&gt;&amp;gt; &amp;gt; the first time in 9
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; years that I've been bitten by PostgreSQL, and this
&lt;br&gt;&amp;gt; &amp;gt; one HURT.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; PostgreSQL didn't crash, so there was no indication of
&lt;br&gt;&amp;gt; &amp;gt; failure until the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; demp-reload. To quote from the masters: Although in
&lt;br&gt;&amp;gt; &amp;gt; theory this should
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; never happen, in practice indexes may become corrupted
&lt;br&gt;&amp;gt; &amp;gt; due to software bugs
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; or hardware failures. I'm reasonably certain that the
&lt;br&gt;&amp;gt; &amp;gt; hardware for the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; server is sound. No crashes, no alarms... That leaves
&lt;br&gt;&amp;gt; &amp;gt; sofware bugs.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; We're running PostgreSQL 8.4.1. I don't see any
&lt;br&gt;&amp;gt; &amp;gt; smoking gun bugfixes in
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 8.4.2, but we'll upgrade ASAP anyway...
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; What are your suggestions for how to proceed?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Interesting, though something is still bothering me. To
&lt;br&gt;&amp;gt; &amp;gt; quote from one of your 
&lt;br&gt;&amp;gt; &amp;gt; posts upstream;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;That was the same failure I got the previous night. I go
&lt;br&gt;&amp;gt; &amp;gt; to the live database 
&lt;br&gt;&amp;gt; &amp;gt; and rows with that key are /not/ in either one of those
&lt;br&gt;&amp;gt; &amp;gt; tables. They /were/ in 
&lt;br&gt;&amp;gt; &amp;gt; the tables at one point. I have an ON DELETE trigger that
&lt;br&gt;&amp;gt; &amp;gt; copies deleted rows 
&lt;br&gt;&amp;gt; &amp;gt; into another table, so I can see that a row with that key
&lt;br&gt;&amp;gt; &amp;gt; once existed in those 
&lt;br&gt;&amp;gt; &amp;gt; tables.&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Would seem that the rows where deleted and should not be
&lt;br&gt;&amp;gt; &amp;gt; there when the table 
&lt;br&gt;&amp;gt; &amp;gt; was reindexed. Are the 'new' rows you are seeing also in
&lt;br&gt;&amp;gt; &amp;gt; the delete table?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; select foo from bar where baz = 'key';
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I was mistaken when I said that the row was not in the table. If I had
&lt;br&gt;&amp;gt; an index on baz, and the index was corrupted, that SQL would return 0
&lt;br&gt;&amp;gt; rows leading me to believe that there were no rows in the table with
&lt;br&gt;&amp;gt; that key.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And, the reason for that row remaining in the database after its
&lt;br&gt;&amp;gt; foreign keyed parent row was deleted was because the delete operation
&lt;br&gt;&amp;gt; was depending on the index to find the rows to delete, and that index
&lt;br&gt;&amp;gt; was corrupt.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Of course, I had no idea that the index was corrupt when I made my
&lt;br&gt;&amp;gt; first post.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On the table that has the &amp;quot;martian&amp;quot; row, there is no delete storage.
&lt;br&gt;&amp;gt; Since the data in the table is trigger-generated for FTI searches,
&lt;br&gt;&amp;gt; there's no reason to keep that data around.
&lt;/div&gt;&lt;br&gt;Would it be possible to see the table schemas and indices ?
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm still faced with the unpleasant and unresolved issue of why the
&lt;br&gt;&amp;gt; index was corrupted in the first place.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Adrian Klaver
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aklaver@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836292&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pg_dump-and-ON-DELETE-CASCADE-problem-tp26716347p26836292.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836211</id>
	<title>Re: alter table performance</title>
	<published>2009-12-17T14:30:28Z</published>
	<updated>2009-12-17T14:30:28Z</updated>
	<author>
		<name>Thomas Kellerer</name>
	</author>
	<content type="html">Antonio Goméz Soto wrote on 17.12.2009 22:26:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am regularly altering tables, adding columns setting default values etc.
&lt;br&gt;&amp;gt; This very often takes a very long time and is very disk intensive, and this
&lt;br&gt;&amp;gt; gets pretty annoying.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Things are hampered by the fact that some of our servers run PG 7.3
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suppose I have a table and I want to add a non NULL column with a
&lt;br&gt;&amp;gt; default value.
&lt;br&gt;&amp;gt; What I normally do is:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; alter table person add column address varchar(64);
&lt;br&gt;&amp;gt; update person set address = '' where address IS NULL;
&lt;br&gt;&amp;gt; alter table person alter column address set not NULL;
&lt;br&gt;&amp;gt; alter table person alter column address set default '';
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When the table contains millions of records this takes forever.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am I doing something wrong? Do other people have the same problems?
&lt;/div&gt;&lt;br&gt;What's wrong with:
&lt;br&gt;&lt;br&gt;alter table person add column address varchar(64) not null default '';
&lt;br&gt;&lt;br&gt;Although I don't know if such a pre-historic version like 7.3 would support that.
&lt;br&gt;&lt;br&gt;It works for 8.4 and I believe this was working with 8.3 and 8.2 as well
&lt;br&gt;&lt;br&gt;Thomas
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836211&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/alter-table-performance-tp26835962p26836211.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836170</id>
	<title>Re: alter table performance</title>
	<published>2009-12-17T14:27:03Z</published>
	<updated>2009-12-17T14:27:03Z</updated>
	<author>
		<name>Alan Hodgson</name>
	</author>
	<content type="html">On Thursday 17 December 2009, Antonio Goméz Soto 
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836170&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;antonio.gomez.soto@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am regularly altering tables, adding columns setting default values
&lt;br&gt;&amp;gt; etc. This very often takes a very long time and is very disk intensive,
&lt;br&gt;&amp;gt; and this gets pretty annoying.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Things are hampered by the fact that some of our servers run PG 7.3
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Suppose I have a table and I want to add a non NULL column with a default
&lt;br&gt;&amp;gt; value. What I normally do is:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; alter table person add column address varchar(64);
&lt;br&gt;&amp;gt; update person set address = '' where address IS NULL;
&lt;br&gt;&amp;gt; alter table person alter column address set not NULL;
&lt;br&gt;&amp;gt; alter table person alter column address set default '';
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When the table contains millions of records this takes forever.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am I doing something wrong? Do other people have the same problems?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Antonio
&lt;/div&gt;&lt;br&gt;You could speed it up:
&lt;br&gt;&lt;br&gt;- drop all indexes on the table
&lt;br&gt;- alter table person add column address varchar(64) not null default ''
&lt;br&gt;- recreate the indexes
&lt;br&gt;&lt;br&gt;It will require exclusive access to the table for the duration, but it'll be 
&lt;br&gt;a lot faster and result in a lot less bloat than what you're doing now. It 
&lt;br&gt;still has to rewrite the whole table, but it's a lot faster than UPDATE. 
&lt;br&gt;&lt;br&gt;(I have no idea if this works on 7.3).
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;quot;No animals were harmed in the recording of this episode. We tried but that 
&lt;br&gt;damn monkey was just too fast.&amp;quot;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836170&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/alter-table-performance-tp26835962p26836170.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26835962</id>
	<title>alter table performance</title>
	<published>2009-12-17T13:26:53Z</published>
	<updated>2009-12-17T13:26:53Z</updated>
	<author>
		<name>Antonio Goméz Soto</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I am regularly altering tables, adding columns setting default values etc.
&lt;br&gt;This very often takes a very long time and is very disk intensive, and this
&lt;br&gt;gets pretty annoying.
&lt;br&gt;&lt;br&gt;Things are hampered by the fact that some of our servers run PG 7.3
&lt;br&gt;&lt;br&gt;Suppose I have a table and I want to add a non NULL column with a default value.
&lt;br&gt;What I normally do is:
&lt;br&gt;&lt;br&gt;alter table person add column address varchar(64);
&lt;br&gt;update person set address = '' where address IS NULL;
&lt;br&gt;alter table person alter column address set not NULL;
&lt;br&gt;alter table person alter column address set default '';
&lt;br&gt;&lt;br&gt;When the table contains millions of records this takes forever.
&lt;br&gt;&lt;br&gt;Am I doing something wrong? Do other people have the same problems?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Antonio
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26835962&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/alter-table-performance-tp26835962p26835962.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836163</id>
	<title>feature request: create table with unique constraint</title>
	<published>2009-12-17T12:51:07Z</published>
	<updated>2009-12-17T12:51:07Z</updated>
	<author>
		<name>wumpus-3</name>
	</author>
	<content type="html">begin ;
&lt;br&gt;&lt;br&gt;create table a (
&lt;br&gt;&amp;nbsp; id serial primary key
&lt;br&gt;&amp;nbsp; , info text not null -- not interested here
&lt;br&gt;) ;
&lt;br&gt;&lt;br&gt;create table b (
&lt;br&gt;&amp;nbsp; id serial primary key
&lt;br&gt;&amp;nbsp; , a_id int not null references a
&lt;br&gt;&amp;nbsp; , info text not null -- not interested here
&lt;br&gt;&amp;nbsp; , actual bool not null
&lt;br&gt;) ;
&lt;br&gt;&lt;br&gt;create unique index b_actual on b
&lt;br&gt;&amp;nbsp; ( a_id , ( case when actual then 0 else id end ) )
&lt;br&gt;;
&lt;br&gt;&lt;br&gt;create table c (
&lt;br&gt;&amp;nbsp; id serial primary key
&lt;br&gt;&amp;nbsp; , a_id int not null references a
&lt;br&gt;&amp;nbsp; , info text not null -- not interested here
&lt;br&gt;&amp;nbsp; , actual bool not null
&lt;br&gt;&amp;nbsp; , unique ( a_id , ( case when actual then 0 else id end ) )
&lt;br&gt;) ;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Why can i not define the unique constraint in the
&lt;br&gt;create table? I know this is described in the manual but
&lt;br&gt;why this is.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;Andreas
&lt;br&gt;&lt;br&gt;&lt;br&gt;btw Why must i give the index a name. The name should
&lt;br&gt;be created automatically if none is specified as i
&lt;br&gt;define a unique constraint in the create table.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836163&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/feature-request%3A-create-table-with-unique-constraint-tp26836163p26836163.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26833987</id>
	<title>Re: How to remove non-UTF values from a table?</title>
	<published>2009-12-17T11:54:45Z</published>
	<updated>2009-12-17T11:54:45Z</updated>
	<author>
		<name>Bruce Momjian-5</name>
	</author>
	<content type="html">Bruce Momjian wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; pg_migrator (not pg_upgrade) has been used by many people to migrate
&lt;br&gt;&amp;gt; from 8.3 to 8.4. &amp;nbsp;I just helped someone yesterday with a migration. 
&lt;br&gt;&amp;gt; pg_migrator threw an error because they had reindexed pg_largeobject,
&lt;br&gt;&amp;gt; and pg_migrator was not prepared to handle that. &amp;nbsp;They also had an old
&lt;br&gt;&amp;gt; cluster with a higher autovacuum_freeze_max_age than the new cluster,
&lt;br&gt;&amp;gt; causing autovacuum freeze to run during the upgrade and remove clog
&lt;br&gt;&amp;gt; files. &amp;nbsp;These are unusual cases, so I assume there are many people who
&lt;br&gt;&amp;gt; successfully use pg_migrator that I never hear from.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Both of these issues are fixed in pg_migrator 8.4.6, released yesterday.
&lt;br&gt;&amp;gt; I also talked to Alvaro about using fixed oids to remove these migration
&lt;br&gt;&amp;gt; restrictions in 8.5:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o &amp;nbsp;a user-defined composite data type
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o &amp;nbsp;a user-defined array data type
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o &amp;nbsp;a user-defined enum data type
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So, pg_migrator is a work in progress. &amp;nbsp;It current requires migration
&lt;br&gt;&amp;gt; testing and should be used by experienced Postgres users. &amp;nbsp;Someday
&lt;br&gt;&amp;gt; pg_migrator will be easier to use and more reliable.
&lt;/div&gt;&lt;br&gt;Oh, and pg_migrator 8.4.6 works for migrations from 8.4 to 8.5 CVS.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; Bruce Momjian &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833987&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruce@...&lt;/a&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://momjian.us&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://momjian.us&lt;/a&gt;&lt;br&gt;&amp;nbsp; EnterpriseDB &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;a href=&quot;http://enterprisedb.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enterprisedb.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; + If your life is a hard drive, Christ can be your backup. +
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833987&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-remove-non-UTF-values-from-a-table--tp26776042p26833987.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26833937</id>
	<title>Re: How to remove non-UTF values from a table?</title>
	<published>2009-12-17T11:51:24Z</published>
	<updated>2009-12-17T11:51:24Z</updated>
	<author>
		<name>Bruce Momjian-5</name>
	</author>
	<content type="html">Tom Lane wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;quot;Raymond O'Donnell&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833937&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rod@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; &amp;gt; On 16/12/2009 15:01, Richard Broersma wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; It looks like the future 8.5 release will be able to
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; preform an in-place upgrade on 8.4.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Really? That would be *wonderful*. I know it's impossible to be
&lt;br&gt;&amp;gt; &amp;gt; definitive, but how likely would you say this is?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It's wishful thinking. &amp;nbsp;We tried to have that for 8.4, and failed: there
&lt;br&gt;&amp;gt; are so many constraints on pg_upgrade that it's not a usable mainstream
&lt;br&gt;&amp;gt; solution. &amp;nbsp;So far as I've seen there has been no work done that would
&lt;br&gt;&amp;gt; make it any more reliable for 8.5.
&lt;/div&gt;&lt;br&gt;Some people just enjoy discouraging people.
&lt;br&gt;&lt;br&gt;pg_migrator (not pg_upgrade) has been used by many people to migrate
&lt;br&gt;from 8.3 to 8.4. &amp;nbsp;I just helped someone yesterday with a migration. 
&lt;br&gt;pg_migrator threw an error because they had reindexed pg_largeobject,
&lt;br&gt;and pg_migrator was not prepared to handle that. &amp;nbsp;They also had an old
&lt;br&gt;cluster with a higher autovacuum_freeze_max_age than the new cluster,
&lt;br&gt;causing autovacuum freeze to run during the upgrade and remove clog
&lt;br&gt;files. &amp;nbsp;These are unusual cases, so I assume there are many people who
&lt;br&gt;successfully use pg_migrator that I never hear from.
&lt;br&gt;&lt;br&gt;Both of these issues are fixed in pg_migrator 8.4.6, released yesterday.
&lt;br&gt;I also talked to Alvaro about using fixed oids to remove these migration
&lt;br&gt;restrictions in 8.5:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o &amp;nbsp;a user-defined composite data type
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o &amp;nbsp;a user-defined array data type
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o &amp;nbsp;a user-defined enum data type
&lt;br&gt;&lt;br&gt;So, pg_migrator is a work in progress. &amp;nbsp;It current requires migration
&lt;br&gt;testing and should be used by experienced Postgres users. &amp;nbsp;Someday
&lt;br&gt;pg_migrator will be easier to use and more reliable.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; Bruce Momjian &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833937&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruce@...&lt;/a&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://momjian.us&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://momjian.us&lt;/a&gt;&lt;br&gt;&amp;nbsp; EnterpriseDB &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;a href=&quot;http://enterprisedb.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enterprisedb.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; + If your life is a hard drive, Christ can be your backup. +
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833937&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-remove-non-UTF-values-from-a-table--tp26776042p26833937.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26833997</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T11:35:10Z</published>
	<updated>2009-12-17T11:35:10Z</updated>
	<author>
		<name>Madison Kelly</name>
	</author>
	<content type="html">Gauthier, Dave wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Everyone:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Tomorrow, I will need to present to a group of managers (who know 
&lt;br&gt;&amp;gt; nothing about DBs) why I chose to use PG over MySQL in a project, MySQL 
&lt;br&gt;&amp;gt; being the more popular DB choice with other engineers, and managers 
&lt;br&gt;&amp;gt; fearing things that are “different” (risk). &amp;nbsp;I have a few hard tecnical 
&lt;br&gt;&amp;gt; reasons (check constraint, deferred constraint checking, array data 
&lt;br&gt;&amp;gt; type), but I’m looking for a “it’s more reliable” reasons. &amp;nbsp;Again, the 
&lt;br&gt;&amp;gt; audience is managers. &amp;nbsp;Is there an impartial, &amp;nbsp;3^rd party evaluation of 
&lt;br&gt;&amp;gt; the 2 DBs out there that identifies PG as being more reliable? &amp;nbsp;It might 
&lt;br&gt;&amp;gt; mention things like fewer incidences of corrupt tables/indexes, fewer 
&lt;br&gt;&amp;gt; deamon crashes, better recovery after system crashes, etc... ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks !
&lt;/div&gt;&lt;br&gt;There is a current question about the survivability of MySQL right now 
&lt;br&gt;with the potential sale of MySQL. I would not bank on MySQL for any 
&lt;br&gt;long-term project. I am sure that MySQL will live in the long run, but 
&lt;br&gt;they may well be turbulent times ahead if whomever comes to own MySQL 
&lt;br&gt;decides to neglect or kill it and the source gets forked.
&lt;br&gt;&lt;br&gt;Madi
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833997&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26833997.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26833999</id>
	<title>Re: Server Requirements</title>
	<published>2009-12-17T11:30:30Z</published>
	<updated>2009-12-17T11:30:30Z</updated>
	<author>
		<name>Madison Kelly</name>
	</author>
	<content type="html">Christine Penner wrote:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If we have clients that are going to buy new computers or upgrade 
&lt;br&gt;&amp;gt; current ones, what we can recommend to them for optimal system 
&lt;br&gt;&amp;gt; performance to run Postgres. These can be servers or desktop PCs. We can 
&lt;br&gt;&amp;gt; have from 1-10 users in at a time. At this point all of our database's 
&lt;br&gt;&amp;gt; are small but that can change of course.
&lt;br&gt;&lt;br&gt;Hi Christine,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;The problem with this question is that it is far too vague to be able 
&lt;br&gt;to answer in any meaningful way. You need to add some information to 
&lt;br&gt;your request. Things like:
&lt;br&gt;&lt;br&gt;- Data set size; How many tables, how many columns, how fast will it 
&lt;br&gt;grow, what kind of data are in the columns?
&lt;br&gt;- Performance; are you using triggers, functions, a lot of complex or 
&lt;br&gt;simple queries, lots of UPDATEs, INSERTs and DELETEs?
&lt;br&gt;- Redundancy; How do you plan to backup the data? What performance 
&lt;br&gt;criteria do you have? What's your acceptable down time in the case of a 
&lt;br&gt;failure?
&lt;br&gt;- Interface; Users is one thing, but how many transactions will these 
&lt;br&gt;users incur?
&lt;br&gt;- Budget; How much is your client willing to invest? What about 
&lt;br&gt;long-term maintenance or support contracts?
&lt;br&gt;- Environment; What operating system will postgres run on?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Answer these questions and you will find the hardware requirements 
&lt;br&gt;will likely begin to become self-evident. If not, ask here again with 
&lt;br&gt;this info and we'll be much more able to help. :)
&lt;br&gt;&lt;br&gt;Madi
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833999&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Server-Requirements-tp26821270p26833999.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26833713</id>
	<title>Re: How to remove non-UTF values from a table?</title>
	<published>2009-12-17T11:29:27Z</published>
	<updated>2009-12-17T11:29:27Z</updated>
	<author>
		<name>Bruce Momjian-5</name>
	</author>
	<content type="html">Tom Lane wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;quot;Raymond O'Donnell&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833713&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rod@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; &amp;gt; On 16/12/2009 15:01, Richard Broersma wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; It looks like the future 8.5 release will be able to
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; preform an in-place upgrade on 8.4.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Really? That would be *wonderful*. I know it's impossible to be
&lt;br&gt;&amp;gt; &amp;gt; definitive, but how likely would you say this is?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It's wishful thinking. &amp;nbsp;We tried to have that for 8.4, and failed: there
&lt;br&gt;&amp;gt; are so many constraints on pg_upgrade that it's not a usable mainstream
&lt;br&gt;&amp;gt; solution. &amp;nbsp;So far as I've seen there has been no work done that would
&lt;br&gt;&amp;gt; make it any more reliable for 8.5.
&lt;/div&gt;&lt;br&gt;I do not share Tom's conclusions.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; Bruce Momjian &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833713&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruce@...&lt;/a&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://momjian.us&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://momjian.us&lt;/a&gt;&lt;br&gt;&amp;nbsp; EnterpriseDB &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;a href=&quot;http://enterprisedb.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enterprisedb.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; + If your life is a hard drive, Christ can be your backup. +
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26833713&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-remove-non-UTF-values-from-a-table--tp26776042p26833713.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26832981</id>
	<title>Re: postgres 8.2.4 cores on SUN</title>
	<published>2009-12-17T10:42:18Z</published>
	<updated>2009-12-17T10:42:18Z</updated>
	<author>
		<name>John R Pierce</name>
	</author>
	<content type="html">Abraham, Danny wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; “postgres” cores on SUN 2.9. Disk is in 100% IO.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (dbx) where
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [1] 0xffffffff65eacdd4(0xffffffff7fffa36c, 0x400, 0x10032d4e8, 0x1, 
&lt;br&gt;&amp;gt; 0x48, 0xd6), at 0xffffffff65eacdd4
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [2] XLogFileInit(0x48, 0xd6, 0xffffffff7fffa85d, 0x1, 0x488000, 0x0), 
&lt;br&gt;&amp;gt; at 0x10007955c
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any idea?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;now without a lot more input.
&lt;br&gt;&lt;br&gt;where did this postgres 8.2.4 come from, how is it configured, what 
&lt;br&gt;hardware is it running on, what operation(s) are you doing when it 
&lt;br&gt;'cores', what is the disk doing thats 10)% busy (eg, what file(s), etc) 
&lt;br&gt;was this system stable prior to this happening, etc etc etc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832981&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/postgres-8.2.4-cores-on-SUN-tp26826946p26832981.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26832948</id>
	<title>Re: Trigger function language</title>
	<published>2009-12-17T10:40:10Z</published>
	<updated>2009-12-17T10:40:10Z</updated>
	<author>
		<name>Tom Lane-2</name>
	</author>
	<content type="html">Vincenzo Romano &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832948&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;vincenzo.romano@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; Is there any performance difference in writing trigger function in SQL
&lt;br&gt;&amp;gt; rather than PL/PgSQL?
&lt;br&gt;&lt;br&gt;SQL functions don't support being called as triggers, so performance
&lt;br&gt;questions are a bit beside the point ...
&lt;br&gt;&lt;br&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; regards, tom lane
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832948&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Trigger-function-language-tp26832798p26832948.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26832923</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T10:38:19Z</published>
	<updated>2009-12-17T10:38:19Z</updated>
	<author>
		<name>John R Pierce</name>
	</author>
	<content type="html">Gauthier, Dave wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi Everyone:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tomorrow, I will need to present to a group of managers (who know 
&lt;br&gt;&amp;gt; nothing about DBs) why I chose to use PG over MySQL in a project, 
&lt;br&gt;&amp;gt; MySQL being the more popular DB choice with other engineers, and 
&lt;br&gt;&amp;gt; managers fearing things that are “different” (risk). I have a few hard 
&lt;br&gt;&amp;gt; tecnical reasons (check constraint, deferred constraint checking, 
&lt;br&gt;&amp;gt; array data type), but I’m looking for a “it’s more reliable” reasons. 
&lt;br&gt;&amp;gt; Again, the audience is managers. Is there an impartial, 3^rd party 
&lt;br&gt;&amp;gt; evaluation of the 2 DBs out there that identifies PG as being more 
&lt;br&gt;&amp;gt; reliable? It might mention things like fewer incidences of corrupt 
&lt;br&gt;&amp;gt; tables/indexes, fewer deamon crashes, better recovery after system 
&lt;br&gt;&amp;gt; crashes, etc... ?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;let me just say this one word about that.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;ORACLE
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;i think its a pretty safe assumption that Oracle will not be good for MySQL.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832923&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26832923.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26832798</id>
	<title>Trigger function language</title>
	<published>2009-12-17T10:31:10Z</published>
	<updated>2009-12-17T10:31:10Z</updated>
	<author>
		<name>Vincenzo Romano</name>
	</author>
	<content type="html">Hi all.
&lt;br&gt;Is there any performance difference in writing trigger function in SQL
&lt;br&gt;rather than PL/PgSQL?
&lt;br&gt;In my case the body would actually be 1 line.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Vincenzo Romano
&lt;br&gt;NON QVIETIS MARIBVS NAVTA PERITVS
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Trigger-function-language-tp26832798p26832798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26831805</id>
	<title>Re: pg_dump and ON DELETE CASCADE problem</title>
	<published>2009-12-17T09:29:05Z</published>
	<updated>2009-12-17T09:29:05Z</updated>
	<author>
		<name>iamchris</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;--- On Tue, 12/15/09, Adrian Klaver &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aklaver@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: Adrian Klaver &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aklaver@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [GENERAL] pg_dump and ON DELETE CASCADE problem
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cgg007@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Cc: &amp;quot;postgresql listserv&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;&amp;gt;, &amp;quot;Craig Ringer&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;craig@...&lt;/a&gt;&amp;gt;, &amp;quot;Scott Marlowe&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;scott.marlowe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Tuesday, December 15, 2009, 6:53 PM
&lt;br&gt;&amp;gt; On Tuesday 15 December 2009 2:33:39
&lt;br&gt;&amp;gt; pm CG wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Bingo. Showed right up. I did a reindex, and now it
&lt;br&gt;&amp;gt; shows up searching via
&lt;br&gt;&amp;gt; &amp;gt; sequential scan or index scan.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; So that's pretty scary to have a corrupted index. Once
&lt;br&gt;&amp;gt; I reindexed, I'm
&lt;br&gt;&amp;gt; &amp;gt; able to see /a lot/ of data I couldn't before. This is
&lt;br&gt;&amp;gt; the first time in 9
&lt;br&gt;&amp;gt; &amp;gt; years that I've been bitten by PostgreSQL, and this
&lt;br&gt;&amp;gt; one HURT.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; PostgreSQL didn't crash, so there was no indication of
&lt;br&gt;&amp;gt; failure until the
&lt;br&gt;&amp;gt; &amp;gt; demp-reload. To quote from the masters: Although in
&lt;br&gt;&amp;gt; theory this should
&lt;br&gt;&amp;gt; &amp;gt; never happen, in practice indexes may become corrupted
&lt;br&gt;&amp;gt; due to software bugs
&lt;br&gt;&amp;gt; &amp;gt; or hardware failures. I'm reasonably certain that the
&lt;br&gt;&amp;gt; hardware for the
&lt;br&gt;&amp;gt; &amp;gt; server is sound. No crashes, no alarms... That leaves
&lt;br&gt;&amp;gt; sofware bugs.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; We're running PostgreSQL 8.4.1. I don't see any
&lt;br&gt;&amp;gt; smoking gun bugfixes in
&lt;br&gt;&amp;gt; &amp;gt; 8.4.2, but we'll upgrade ASAP anyway...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What are your suggestions for how to proceed?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Interesting, though something is still bothering me. To
&lt;br&gt;&amp;gt; quote from one of your 
&lt;br&gt;&amp;gt; posts upstream;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;That was the same failure I got the previous night. I go
&lt;br&gt;&amp;gt; to the live database 
&lt;br&gt;&amp;gt; and rows with that key are /not/ in either one of those
&lt;br&gt;&amp;gt; tables. They /were/ in 
&lt;br&gt;&amp;gt; the tables at one point. I have an ON DELETE trigger that
&lt;br&gt;&amp;gt; copies deleted rows 
&lt;br&gt;&amp;gt; into another table, so I can see that a row with that key
&lt;br&gt;&amp;gt; once existed in those 
&lt;br&gt;&amp;gt; tables.&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Would seem that the rows where deleted and should not be
&lt;br&gt;&amp;gt; there when the table 
&lt;br&gt;&amp;gt; was reindexed. Are the 'new' rows you are seeing also in
&lt;br&gt;&amp;gt; the delete table?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;select foo from bar where baz = 'key';
&lt;br&gt;&lt;br&gt;I was mistaken when I said that the row was not in the table. If I had an index on baz, and the index was corrupted, that SQL would return 0 rows leading me to believe that there were no rows in the table with that key.
&lt;br&gt;&lt;br&gt;And, the reason for that row remaining in the database after its foreign keyed parent row was deleted was because the delete operation was depending on the index to find the rows to delete, and that index was corrupt.
&lt;br&gt;&lt;br&gt;Of course, I had no idea that the index was corrupt when I made my first post.
&lt;br&gt;&lt;br&gt;On the table that has the &amp;quot;martian&amp;quot; row, there is no delete storage. Since the data in the table is trigger-generated for FTI searches, there's no reason to keep that data around.
&lt;br&gt;&lt;br&gt;I'm still faced with the unpleasant and unresolved issue of why the index was corrupted in the first place.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831805&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pg_dump-and-ON-DELETE-CASCADE-problem-tp26716347p26831805.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26831342</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T08:58:36Z</published>
	<updated>2009-12-17T08:58:36Z</updated>
	<author>
		<name>Kevin Kempter-4</name>
	</author>
	<content type="html">On Thursday 17 December 2009 09:51:19 Richard Broersma wrote:
&lt;br&gt;&amp;gt; On Thu, Dec 17, 2009 at 8:23 AM, Gauthier, Dave &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831342&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dave.gauthier@...&lt;/a&gt;&amp;gt; 
&lt;br&gt;wrote:
&lt;br&gt;&amp;gt; &amp;gt; How difficult is it to switch the master's hat from one DB instance to
&lt;br&gt;&amp;gt; &amp;gt; another? &amp;nbsp;Let's say the master in a master-slave scenario goes down but
&lt;br&gt;&amp;gt; &amp;gt; the slave is fine. &amp;nbsp;Can I designate the slave as being the new master,
&lt;br&gt;&amp;gt; &amp;gt; use it for read/write, and then just call the broken master the new slave
&lt;br&gt;&amp;gt; &amp;gt; once it comes back to life (something like that)?
&lt;br&gt;&lt;br&gt;This is very easy with SLONY. &amp;nbsp;If the master is truly 'dead' you can run a 
&lt;br&gt;SLONY &amp;nbsp;'failover' command like this (note these are slonik commands where node 
&lt;br&gt;1 is the 'dead' master and node 2 is the current slave):
&lt;br&gt;&lt;br&gt;echo 'Preparing to failover (set id = 1, backup node = 2)';
&lt;br&gt;failover (id = 1, backup node = 2);
&lt;br&gt;echo 'Done';
&lt;br&gt;echo 'Preparing to drop node (set id = 1, event node = 2)';
&lt;br&gt;drop node (id = 1, event node = 2);
&lt;br&gt;echo 'Done';
&lt;br&gt;echo 'Failover complete';
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;at this point the dead master node is no longer part of the replication 
&lt;br&gt;cluster and the slave is the new master
&lt;br&gt;&lt;br&gt;Once the dead node is rebuilt then you simply add it to the replication 
&lt;br&gt;cluster as a new slave node
&lt;br&gt;&lt;br&gt;&lt;br&gt;Also, if you just wanted to &amp;quot;move&amp;quot; the master, changing the existing master 
&lt;br&gt;into a slave in the process you can do this:
&lt;br&gt;&lt;br&gt;lock set (id = 1, origin = 1);
&lt;br&gt;wait for event (origin = 1, confirmed = 2);
&lt;br&gt;echo 'set locked';
&lt;br&gt;move set (id = 1, old origin = 1, new origin = 2);
&lt;br&gt;wait for event (origin = 1, confirmed = 2);
&lt;br&gt;echo 'switchover complete';
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I know someone that uses a revolving Sony Master-Slave setup between
&lt;br&gt;&amp;gt; China and the US. &amp;nbsp;During the US working hour the US server is the
&lt;br&gt;&amp;gt; master, during the working hours of China it becomes the Master.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Of course the person how constructed this system mentioned it was
&lt;br&gt;&amp;gt; woefully challenging. &amp;nbsp;In his case, not only was the slony
&lt;br&gt;&amp;gt; configuration difficult but also finding and keeping stable
&lt;br&gt;&amp;gt; communication path-ways between China and the US.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831342&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26831342.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26831310</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T08:57:40Z</published>
	<updated>2009-12-17T08:57:40Z</updated>
	<author>
		<name>Greg Sabino Mullane</name>
	</author>
	<content type="html">&lt;br&gt;-----BEGIN PGP SIGNED MESSAGE----- &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;Hash: RIPEMD160 &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;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; How difficult is it to switch the master's hat from one DB instance 
&lt;br&gt;&amp;gt; to another? &amp;nbsp;Let's say the master in a master-slave scenario goes &amp;nbsp; 
&lt;br&gt;&amp;gt; down but the slave is fine. &amp;nbsp;Can I designate the slave as being the 
&lt;br&gt;&amp;gt; new master, use it for read/write, and then just call the broken &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; master the new slave once it comes back to life (something like that)?
&lt;br&gt;&lt;br&gt;Sure. Bucardo slaves are not changed at all, so they are already 
&lt;br&gt;read/write and don't need anything special done to &amp;quot;unslave&amp;quot; them.
&lt;br&gt;&lt;br&gt;One possible way to handle the scenario is:
&lt;br&gt;&lt;br&gt;Assuming three servers:
&lt;br&gt;* A (master) sends changes to B, receives read/write queries
&lt;br&gt;* B (slave) has transaction_read_only set to true, receives read queries
&lt;br&gt;* C has the Bucardo database and daemon
&lt;br&gt;&lt;br&gt;Box A goes down suddenly.
&lt;br&gt;&lt;br&gt;* Stop Bucardo on box C
&lt;br&gt;* Flip the boxes around in the bucardo.db table
&lt;br&gt;* Do a 'bucardo_ctl validate sync all'
&lt;br&gt;&amp;nbsp; (This will create the needed triggers on B)
&lt;br&gt;* Set B's transaction_read_only to false
&lt;br&gt;* Point your apps at B instead of A for read/write queries
&lt;br&gt;&lt;br&gt;When A comes back up:
&lt;br&gt;&lt;br&gt;* DROP SCHEMA bucardo CASCADE; (drops all triggers)
&lt;br&gt;* Set transaction_read_only to true
&lt;br&gt;* Start Bucardo on C
&lt;br&gt;* Once caught up, point read-only queries to A
&lt;br&gt;&lt;br&gt;If you are in a rush, you point things to B immediately after A fails,
&lt;br&gt;but you'll have to recopy the entire table data to the slave, as the
&lt;br&gt;triggers won't be in place yet.
&lt;br&gt;&lt;br&gt;- --
&lt;br&gt;Greg Sabino Mullane &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831310&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;greg@...&lt;/a&gt;
&lt;br&gt;End Point Corporation &lt;a href=&quot;http://www.endpoint.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.endpoint.com/&lt;/a&gt;&lt;br&gt;PGP Key: 0x14964AC8 200912171153
&lt;br&gt;&lt;a href=&quot;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&lt;/a&gt;&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;iEYEAREDAAYFAksqYqUACgkQvJuQZxSWSsjZtQCfTwbI3f9W0z+82IU7lL+2LwNK
&lt;br&gt;aUYAnj3AMjRDOeFIuHDee4JJemneArie
&lt;br&gt;=75Ho
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831310&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26831310.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26831316</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T08:56:03Z</published>
	<updated>2009-12-17T08:56:03Z</updated>
	<author>
		<name>Dimitri Fontaine-3</name>
	</author>
	<content type="html">&amp;quot;Gauthier, Dave&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831316&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dave.gauthier@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt; I am more concerned with getting a robust DB replication system up and
&lt;br&gt;&amp;gt; running. &amp;nbsp;Bucardo looks pretty good, but I've just started looking at
&lt;br&gt;&amp;gt; the options. &amp;nbsp;Any suggestions?
&lt;br&gt;&lt;br&gt;Master Slave replication? Meaning no writes on the &amp;quot;sister site&amp;quot;.
&lt;br&gt;&lt;br&gt;If yes, consider Londiste from Skytools. Easy to setup and maintain, and
&lt;br&gt;robust.
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://wiki.postgresql.org/wiki/Skytools&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.postgresql.org/wiki/Skytools&lt;/a&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://wiki.postgresql.org/wiki/Londiste_Tutorial&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.postgresql.org/wiki/Londiste_Tutorial&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;-- 
&lt;br&gt;dim
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831316&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26831316.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26831200</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T08:51:19Z</published>
	<updated>2009-12-17T08:51:19Z</updated>
	<author>
		<name>Richard Broersma</name>
	</author>
	<content type="html">On Thu, Dec 17, 2009 at 8:23 AM, Gauthier, Dave &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831200&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dave.gauthier@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; How difficult is it to switch the master's hat from one DB instance to another?  Let's say the master in a master-slave scenario goes down but the slave is fine.  Can I designate the slave as being the new master, use it for read/write, and then just call the broken master the new slave once it comes back to life (something like that)?
&lt;br&gt;&lt;br&gt;&lt;br&gt;I know someone that uses a revolving Sony Master-Slave setup between
&lt;br&gt;China and the US. &amp;nbsp;During the US working hour the US server is the
&lt;br&gt;master, during the working hours of China it becomes the Master.
&lt;br&gt;&lt;br&gt;Of course the person how constructed this system mentioned it was
&lt;br&gt;woefully challenging. &amp;nbsp;In his case, not only was the slony
&lt;br&gt;configuration difficult but also finding and keeping stable
&lt;br&gt;communication path-ways between China and the US.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Regards,
&lt;br&gt;Richard Broersma Jr.
&lt;br&gt;&lt;br&gt;Visit the Los Angeles PostgreSQL Users Group (LAPUG)
&lt;br&gt;&lt;a href=&quot;http://pugs.postgresql.org/lapug&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pugs.postgresql.org/lapug&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831200&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26831200.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26830752</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T08:23:48Z</published>
	<updated>2009-12-17T08:23:48Z</updated>
	<author>
		<name>Gauthier, Dave</name>
	</author>
	<content type="html">How difficult is it to switch the master's hat from one DB instance to another? &amp;nbsp;Let's say the master in a master-slave scenario goes down but the slave is fine. &amp;nbsp;Can I designate the slave as being the new master, use it for read/write, and then just call the broken master the new slave once it comes back to life (something like that)?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830752&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general-owner@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830752&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general-owner@...&lt;/a&gt;] On Behalf Of Greg Sabino Mullane
&lt;br&gt;Sent: Thursday, December 17, 2009 9:28 AM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830752&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [GENERAL] Justifying a PG over MySQL approach to a project
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----BEGIN PGP SIGNED MESSAGE----- &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;Hash: RIPEMD160 &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;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; - MySQL is horizontally scalable via clustering and multi-master
&lt;br&gt;&amp;gt; replication (though you must beware of numerous gotchas). PostgreSQL can
&lt;br&gt;&amp;gt; be used with read-only slaves via Slony/Bucardo/etc replication, but is
&lt;br&gt;&amp;gt; limited to a single authoriative master.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (There's work ongoing to enable readonly hot standby slaves with
&lt;br&gt;&amp;gt; failover, but no multi-master is on the horizion).
&lt;br&gt;&lt;br&gt;Well that's refreshing: usually Bucardo is mistaken for a system that
&lt;br&gt;only does master-master and not master-slave, rather than vice-versa. :)
&lt;br&gt;You can have two authoritative masters with Bucardo, in addition to
&lt;br&gt;any number of slaves radiating from one or both of those (as well as
&lt;br&gt;just simple master-&amp;gt;slaves).
&lt;br&gt;&lt;br&gt;&amp;gt; - It's a cool tool when you want to query and integrate data from all
&lt;br&gt;&amp;gt; sorts of disparate sources, thanks to its support for pluggable storage
&lt;br&gt;&amp;gt; engines. If you want something for data analysis and integration rather
&lt;br&gt;&amp;gt; than safe storage it's well worth looking at.
&lt;br&gt;&lt;br&gt;What sort of sources? I'm curious here to find areas we can improve upon.
&lt;br&gt;&lt;br&gt;- --
&lt;br&gt;Greg Sabino Mullane &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830752&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;greg@...&lt;/a&gt;
&lt;br&gt;End Point Corporation &lt;a href=&quot;http://www.endpoint.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.endpoint.com/&lt;/a&gt;&lt;br&gt;PGP Key: 0x14964AC8 200912170927
&lt;br&gt;&lt;a href=&quot;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8&lt;/a&gt;&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;iEYEAREDAAYFAksqP9kACgkQvJuQZxSWSshbUQCg3CfvpeivDi6gg2bkr74I17Qe
&lt;br&gt;RKAAnRu3GTUQ3Bg3R2Fq3eOsgK4N0xd1
&lt;br&gt;=5r9R
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830752&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830752&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26830752.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26830662</id>
	<title>Re: Justifying a PG over MySQL approach to a project</title>
	<published>2009-12-17T08:19:05Z</published>
	<updated>2009-12-17T08:19:05Z</updated>
	<author>
		<name>Gauthier, Dave</name>
	</author>
	<content type="html">Actually, the DB I'm working on is rather small but has a somewhat complex system of constraints and triggers that maintain the data. &amp;nbsp;Queries will outnumber writes (20x at least). &amp;nbsp;And the DB has to be mirrorred at a sister site a couple thousand miles away, so I'm looking for a robust DB replication system for that. &amp;nbsp;
&lt;br&gt;&lt;br&gt;These are the key points they will be worried about...
&lt;br&gt;- DB up time (most important), including recovery time after disasters (e.g. power outages)
&lt;br&gt;- Data integrity. &amp;nbsp;I'm addressing this with constraints and using triggers to populate columns with derived data.
&lt;br&gt;- Data Quality. &amp;nbsp;NO CORRUPT TABLES / INDEXES
&lt;br&gt;- Retrofitting existing apps to work with PG. &amp;nbsp;Perl/DBI is a subtle change in the DBD designation. &amp;nbsp;Some Tcl-MySQL code is tougher. &amp;nbsp;I'm proposing changing everything to go through ODBC as a standard now, and for the future.
&lt;br&gt;- Cost of maintainence. &amp;nbsp;Do I have to babysit this DB 4 hours every day, or does it run by itself? &amp;nbsp;Is this like Oracle where we have to hire professional 24x7 DBAs, or is this hands-off? &amp;nbsp;That kind of question.
&lt;br&gt;&lt;br&gt;I have a DB up and working. &amp;nbsp;Runs great, no problems, but very lightly loaded and/or used at this time. &amp;nbsp;Having worked with PG in the past, I'm not worried about this piece.
&lt;br&gt;&lt;br&gt;I am more concerned with getting a robust DB replication system up and running. &amp;nbsp;Bucardo looks pretty good, but I've just started looking at the options. &amp;nbsp;Any suggestions?
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Erik Jones [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830662&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ejones@...&lt;/a&gt;] 
&lt;br&gt;Sent: Thursday, December 17, 2009 4:42 AM
&lt;br&gt;To: Craig Ringer
&lt;br&gt;Cc: Gauthier, Dave; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830662&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [GENERAL] Justifying a PG over MySQL approach to a project
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Dec 16, 2009, at 10:30 PM, Craig Ringer wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; - If you don't care about your data, MySQL used with MyISAM is *crazy* fast for lots of small simple queries.
&lt;br&gt;&lt;br&gt;This one causes me no end of grief as too often it's simply touted as &amp;quot;MyISAM is fast(er)&amp;quot; while leaving of the bit about &amp;quot;for lots of small, simple queries&amp;quot;. &amp;nbsp;Developers then pick MySQL with MyISAM storage and then scratch their heads saying, &amp;quot;But! &amp;nbsp;I heard it was faster...,&amp;quot; when I tell them the reason their app is crawling is because they have even moderately complex reads or writes starving out the rest of their app thanks to the table locks required by MyISAM. &amp;nbsp;As you mentioned, for the type of active workloads that MyISAM is good for, you might as well just use memcache over something more reliable and/or concurrent, or even a simple key-value or document store if you really don't need transactions.
&lt;br&gt;&lt;br&gt;Erik Jones, Database Administrator
&lt;br&gt;Engine Yard
&lt;br&gt;Support, Scalability, Reliability
&lt;br&gt;866.518.9273 x 260
&lt;br&gt;Location: US/Pacific
&lt;br&gt;IRC: mage2k
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent via pgsql-general mailing list (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830662&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgsql-general@...&lt;/a&gt;)
&lt;br&gt;To make changes to your subscription:
&lt;br&gt;&lt;a href=&quot;http://www.postgresql.org/mailpref/pgsql-general&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/mailpref/pgsql-general&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Justifying-a-PG-over-MySQL-approach-to-a-project-tp26818398p26830662.html" />
</entry>

</feed>
