Home > Archive > Slony1 PostgreSQL Replication > September 2005 > Re: Need to recover DB with partial data...into









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Need to recover DB with partial data...into
Philip Warner

2005-09-10, 3:23 am

Alan Hodgson wrote:

>SELECT CASE WHEN sl.log_cmdtype = 'I' THEN 'INSERT INTO ' || st.tab_nspname || '.' || st.tab_relname || ' ' || sl.log_cmddata WHEN sl.log_cmdtype = 'U' THEN 'UPDATE ' || st.tab_nspname || '.' || st.tab_relname || ' SET ' || sl.log_cmddata WHEN sl.log_cm

dtype = 'D' THEN 'DELETE FROM ' || st.tab_nspname || '.' || st.tab_relname || ' WHERE ' || sl.log_cmddata END || ';' FROM sl_log_1 sl JOIN sl_table st ON (sl.log_tableid=st.tab_id) ORDER BY sl. log_actionseq;[color
=darkred]
>
>
>[/color]
Very simple; I'll try Jan's suggestion first and file this away for a
last ditch effort -- although this has the advantage of allowing me to
select specific tables. Then again, maybe I can just delete rows from
sl_log before following Jan's suggested approach.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com