Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > dbmirror - migr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 3453 of 3661
Post > Topic >>

dbmirror - migration to 8.3 from 7.4

by achill@[EMAIL PROTECTED] (Achilleas Mantzios) May 7, 2008 at 02:42 PM

Hi,
we have been running our own heavily modified/enhanced version of
dbmirror, running on 7.4 for some years, 
and now it is the time to upgrade to 8.3.
We have called our approach "Conditional row grained + FK dependency
oriented lazy replication", that is,
any FK dependencies of a row are tranfered only when needed, and each
remote slave has a subset of the
master DB. This is applied to a uucp network of postgresql installations
that communicate over satelite
dialup connections. That is why we cannot follow any officially sup****ted
replication platform.
Now back to my issue,
In the code, i do some SELECTs from the pg_catalog.pg_index,
pg_catalog.pg_constraint c,pg_catalog.pg_class,
pg_catalog.pg_attribute and i would like to have your opinion on wether
some semantics have changed or
added to the new pg_catalog tables.

The way i find the primary key of a table is:
	SELECT indkey FROM pg_index WHERE indisprimary='t' AND indrelid=TABLEOID;
i noticed that some columns have been added to pg_index : indisvalid,
indcheckxmin, indisready,indoption
Should i include any of them (e.g. indisvalid) in the where clause above?

The way i find the FK of a table is:
	SELECT c.confrelid,c.conkey,c.confkey,f.relname FROM
pg_catalog.pg_constraint c,pg_catalog.pg_class f 
		WHERE c.contype = 'f' AND c.confrelid = f.oid AND c.conrelid= TABLEOID;
I noticed that some columns have been added to pg_constraint:
conpfeqop,conppeqop,conffeqop
Should i change something to the above query?

Finally, the way i find the name of a column is:
	SELECT attname FROM pg_attribute WHERE attrelid=TABLEOID and
attnum=ATTNUM;

Also, i had to change any int2vector code, since now int2vector are
implemented like varlenas,
and also i had to add PG_DETOAST_DATUM on any array Datum.

The code seems to work however i'd like your comments if i miss something.
Thanks a lot.
-- 
Achilleas Mantzios

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 4 Posts in Topic:
dbmirror - migration to 8.3 from 7.4
achill@[EMAIL PROTECTED]   2008-05-07 14:42:25 
Re: dbmirror - migration to 8.3 from 7.4
kometen@[EMAIL PROTECTED]  2008-05-07 13:49:31 
Re: dbmirror - migration to 8.3 from 7.4
achill@[EMAIL PROTECTED]   2008-05-07 14:52:59 
Re: dbmirror - migration to 8.3 from 7.4
kometen@[EMAIL PROTECTED]  2008-05-07 13:51:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:46:46 CDT 2008.