From all Redshift documentation / forums I've read, I understand the files in path are deleted before the unload.
From UNLOAD - Amazon Redshift:
CLEANPATH
The CLEANPATH option removes existing files located in the Amazon S3 path specified in the TO clause before unloading files to the specified location.
However, when I am testing this, the original files are still there and don't get deleted until after the unload is complete, except for those that are 'overwritten', is this how it works, or am I doing something wrong? It seems to take several seconds after the unload completes, and I'd be afraid that with my next step, ie, copy, some of those files which might not yet have deleted, will cause dupes in my target.
Thanks for your answer !!!
Summary: I ran unload with maxfile 250, then ran again with maxfile 500, and some of the previous files showed on the S3 bucket for several seconds after the completion of the unload.