aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-09-10 09:43:32 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-09-10 09:43:32 +0000
commitfbee791d05eaebdda0530dfe697ee781045b8549 (patch)
treec2a33589b04b8addafb84fcf351dabb5b9b1baee /src/backend/access/gist
parent8587a26b1a2ebc51611feee58f7ea587d0c90f05 (diff)
downloadpostgresql-fbee791d05eaebdda0530dfe697ee781045b8549.tar.gz
postgresql-fbee791d05eaebdda0530dfe697ee781045b8549.zip
On Windows, when a file is deleted and another process still has an open
file handle on it, the file goes into "pending deletion" state where it still shows up in directory listing, but isn't accessible otherwise. That confuses RemoveOldXLogFiles(), making it think that the file hasn't been archived yet, while it actually was, and it was deleted along with the .done file. 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. Backpatch to 8.2, which is the oldest version supported on Windows.
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions