heikki@postgresql.org (Heikki Linnakangas) writes:
> Fix that by renaming the file with ".deleted" extension before deleting it.
> Also check the return value of rename() and unlink(), so that if the removal
> fails for any reason (e.g another process is holding the file locked), we
> don't delete the .done file until the WAL file is really gone.
This patch seems to me to be a seriously bad idea. It means that some
random process holding a file open will be able to cause checkpoints to
fail indefinitely. Is it really necessary or advisable to have the
error cases be elog(ERROR)? Couldn't we just elog(LOG) and leave the
file alone?
regards, tom lane