Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm importing my company's entire DB into a local database. Would closing my laptop, thus putting it to sleep, make me have to start over, or would it recover as normal?

It's a MacBook Pro with OSX Lion.


EDIT:

I'm closing it up and heading home; hopefully I don't have to restart this, but it would be good to know for future reference. I'll let you know!


EDIT2:

made it home, according to top, ps and jobs it's still chugging along...

share|improve this question

migrated from stackoverflow.com Sep 19 '12 at 21:41

This question came from our site for professional and enthusiast programmers.

1  
if sleep shuts down your harddrive, then I am gonna guess it will stop the import. –  bluefeet Sep 19 '12 at 21:19
    
Probably. However, you can configure what closing your laptop does in Control Panel -> Power Options. If you just want to close the lid, you can set it to turn off the screen instead of sleeping. –  Kryptonite Sep 19 '12 at 21:22
    
Since it is a local database, I don't see why sleep would abort the import. That would be like getting all ongoing writes to any files corrupted the moment you sleep the machine. –  lanzz Sep 19 '12 at 21:27
1  
Why close it if you're unsure? –  Ivan Nevostruev Sep 19 '12 at 21:28
    
@IvanNevostruev I want to go home, but I still have a lot of work to do... –  JKirchartz Sep 19 '12 at 21:30
show 4 more comments

2 Answers

up vote 1 down vote accepted

Any I/O operations in progress are suspended on sleep and are resumed when your system wakes up. Simple I/O operations such as copying or moving files within a hard drive will continue normally, but putting a computer to sleep may interfere with operations that expect continuity and do not guarantee successful continuation after resuming from sleep, such as programs that are communicating with each other in real time. This includes clients communicating with servers.

In your case, because the client-server connection is on the local machine and database systems tend to be robust against these types of interruptions, you were able to continue without problems. However, if the operation involves a network connection, such as a download, the connection is dropped on sleep and is started anew on resuming, terminating any network transfer in progress.

share|improve this answer
add comment

I would not sleep it just to be safe. That you will not have to redo anything.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.