|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
PostgreSQL, Inc. is today contributing its commercially developed replication solution, eRServer(c) v1.0+ for the PostgreSQL database, to the PostgreSQL project and the global open source community. There seems to be a discrepancy between the announcement version, v1.0+ and the actual download which seems to be v1.2. In keeping with its pronouncement made in December 2000 to open source all and any of its products after two years, PgSQL, Inc. is releasing its proprietary version of the eRServer to the community under the BSD Open Source Software License. eRServer is a descendent from the rserv code. It is a trigger-based single-master/multi-slave asynchronous replication system. eRServer will enable live replication of PostgreSQL databases. This replication can be used to distribute copies of read only databases and provide a failover database. Replication is considered to be a crucial requirement for enterprise systems. The single-master/multi-slave replication describes the data path. The master database is the only one which is available for INSERTS, UPDATES and DELETES and for data definition statements, such as CREATE TABLE. The slave databases are available for querying only except for the eRServer process. If any other updates occur on the slave they will corrupt the premise of perfect replication. "However," cautions Fournier, "replication can be an extremely complex area for programming in enterprise systems - so even the more advanced database users should expect to invest a good deal of development time and effort in properly deploying this software." I expect that this release, as it is downloaded and used, will be improved steadily. Ideally the difficulty in deployment will lessen as the product matures. See SlashDot if you are interested in trolls and ill-informed arguments sprinkled with a few insights and praises for PgSQL, Inc. It is interesting that the mine-is-better-than-yours arguments span across a good number of other databases, Oracle, Firebird, MSSQL, mysql. More information about and download of eRServer is available on GBorg. The eRServer-general mailing list will also be a good resource.
I downloaded eRServer and tried to build it quickly... and ran smack into the first problem: BUILD FAILED javax.xml.parsers.FactoryConfigurationError: Cannot load class SAXParserFactory class "org.apache.xerces.jaxp.SAXParserFactoryImplBy perusing the erserver-general mailing list I found that this problem could be solved. The problem seems to be that the file java/lib/xerces.jar is corrupted. It can be repaired by doing: zip -FF java/lib/xerces.jar An initial postings of problems with eRServer seem to point to a last minute interface change from Pg.pm to DBI. Apparently, those people who built successfully and had configured correctly had everything running, but no replication actually occurred. The problem was in the code which added tables and ids to the _rserv_slave_tables_. The solution is to use SQL on the master database directly: INSERT INTO _rserv_slave_tables_ (tname, cname, reloid, key) SELECT r.relname, a.attname, r.oid, a.attnum FROM pg_class r, pg_attribute a WHERE r.oid = a.attrelid AND r.relname = 'your_relation_name' AND a.attname = '_ers_uniq'You can also add extra slave tables this way, one at a time, if you need to. It is not unusual for the first public glimpse of a highly anticipated project to have a few kinks to work out. I am very positive that the initial problems will be worked out quickly and I look forward to using eRServer regularly.
Conversion from a select list into an array value is possible. The technique is drop dead simple for 7.4, and a little more difficult in 7.3. The effect we want is this. This does not work. INSERT INTO foo (arrayval) select a,b,c from bar; In 7.4, simply use the array construct like this: INSERT INTO foo SELECT array[a,b,c] FROM bar;The array constructor in 7.4 is a very useful feature if you use arrays. In 7.3, you must define a function to do the conversion for you. This function cannot handle a variable number of arguments, so you may find yourself overloading the function by redefining it with different numbers of arguments. create or replace function ints2array(int,int,int) returns integer[] as ' DECLARE retarr integer[]; BEGIN return ''{'' || $1 || '','' || $2 || '','' || $3 || ''}''; END ' language 'plpgsql';
The final feature list is still a little fuzzy to me. The Release Notes for 7.4 are coming together. The full yet terse notes are in the HISTORY file (here truncated to 7.4) at the top of the postgresql tree. This file was last updated 1-Aug-2003. The other place to look is the Developers TODO List, last updated 25-Aug-2003. Bruce Momjian is the primary maintainer for both these lists.
Before moving on to the list of updates from the
TODO List,
we have a little note about conversion: From the TODO List we have the following features marked as included in 7.4. At this point in time (no pun intended) of the 7.4 Beta we can assume that these items are complete. Reporting
Thank you to each of you who took the time to fill out the survey in Issue # 40. If you have not yet responded to the survey, there is still time :-) Here are a few Varlena Web Site Hints:
As always, comments, corrections and suggestions are welcome.
|
|||||||||||||||||||||||||||||||||
Comments and Corrections are welcome. Suggestions and contributions of items are also welcome. Send them in! Copyright A. Elein Mustain 2003, 2004, 2005, 2006, 2007, 2008, 2009 |