in reply to Atomic use of unlink() and SQL DELETE? How?

If it were me, I'd not kill myself trying to do this perfectly. Getting the atomic transaction right, along with the cascading deletes, etc. seems to not be worth it.

Have you considered relaxing your requirements a bit so that the delete will work correctly in all but the most extreme circumstances, and then just running a periodic maintenance job to make sure you're clean on files-to-pointers and pointers-to-files?

Perfection is cool, but can be dear to implement.

  • Comment on Re: Atomic use of unlink() and SQL DELETE? How?

Replies are listed 'Best First'.
Re^2: Atomic use of unlink() and SQL DELETE? How?
by robins (Acolyte) on Feb 09, 2006 at 13:47 UTC

    Do you have a good suggestion for the "almost perfect" solution?

    Could you point me in the right direction about what I'm doing wrong in the current function? I know I'm doing something wrong, but I think I've managed to blindfold myself while looking at the problem...