On 12/19/05, Matthew Jarvis <[EMAIL PROTECTED]> wrote:
> Anyhoo, last Thurs for the first time since I've been here (about 5 mo)
> that data transfer didn't complete.

Have you figured out why it didn't complete?

> For better or worse the update process uses a DELETE then COPY sequence
> to update the tables on the site. The DELETE takes place, table is
> updated, next DELETE, next table etc.... sometimes the process isn't
> being completed as though something is timing out, so I was looking to
> a) speed up the whole process and b) park at least a snapshot of the
> data up on the server so I can just import it in and get the site back
> to functionality

If the data is relatively similar from night to night you can speed up
the transfer quite a lot by using rsync which works very well on line
oriented data formats like sql text dumps.

If you want to make sure that the tables never go away, even if the
process is interrupted partway through, make sure that each
delete/copy operation is wrapped in a transaction, something like.

BEGIN WORK;
DELETE FROM bar;
COPY bar FROM '/home/foo/bar.dump' WITH DELIMITER AS "|" NULL AS "";
COMMIT WORK;

that way if it blows up on you during the COPY operation, it's as if
the DELETE never happened.


--
http://Zoneverte.org -- information explained
Do you know what your IT infrastructure does?
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to