cheighlund cheighlund at yahoo.com
Wed Sep 10 08:18:16 PDT 2008
We're using Slony replication and logshipping on our main database to handle
data transfers for multiple remote locations.  The main setup (where the
logshipping records are generated) is running SuSE 9.3, Postgres 8.1.3 (yes,
I know that's fairly old) and Slony 1.1.5.  All of these were set up by my
predecessor at this position.

Recently, I was attempting to repair a second, log-shipping replicated
database on the main server.  We have a perl script which pulls the
necessary schema (including the complete schema and data from the
log-shipping-based replicated table) and data, then packs them for quick
transmission.  By accident (I wasn't paying enough attention), I managed to
load the schema from the rebuild pack into our main DB, the one running as
the 'master' node, which apparently managed to seriously damage the schema.

We have a backup file from early in the morning of the mistake, but it was
dropped as the public schema and public data only, no replication
information.  Loading only it into the database and running slon_start with
the correct configuration path caused the program to die before acting,
stating that the schema '_cpc_replic' did not exist.

I had an older copy of a database dump sitting around (I have no clue why I
left it there originally), and thought I could attempt to load it, strip the
'_cpc_replic' information from it using pg_dump, then load that back into
the original database.  I tried two attempts, neither of which worked
properly.  The first attempt was to drop that dumped '_cpc_replic' schema
straight onto the newly-loaded db, the second was to load the original
public schema, then the '_cpc_replic' information, then the public data.  In
both cases, logshipping would start, only to die a few minutes later with a
fatal error saying there was no operator for '_cpc_replic.xxid' < "unknown"
when comparing log_xid values on a delete statement.

After dropping that copy of the database and rebuilding again, I started by
trying to load the '_cpc_replic' schema (again, with data) first, then the
public schema, then the public data.  Attempting to run slon_start with that
has appeared to work so far; it's been going for a little over nineteen
hours without running into the error that shut the previous runs down. 
However, it has not generated any log-shipping files.  

In the interest of full disclosure of my original stupidity, I did not
attempt to drop the 'slave'-end database, only the master.  I'm wondering if
this may be partially or completely responsible for why we are seeing no
log-shipping messages.

Alternately, if I've managed to mangle things even further and should stop,
delete what I've got, and start over fresh, I would appreciate knowing this
as well, along with the proper procedures to be used in such a case.

Thank you.
-- 
View this message in context: http://www.nabble.com/Questions-regarding-dumping-restoring-a-replicating-database.-tp19414810p19414810.html
Sent from the Slony-I -- General mailing list archive at Nabble.com.



More information about the Slony1-general mailing list