aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-12-20 15:00:36 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-12-20 15:00:36 -0500
commitd0024cd1881447fa7aed58db94df379e593c6630 (patch)
tree6822acfc4d115bdffab52081e3bd8194afbada74 /src/backend/tcop/postgres.c
parent729205571e81b4767efc42ad7beb53663e08d1ff (diff)
downloadpostgresql-d0024cd1881447fa7aed58db94df379e593c6630.tar.gz
postgresql-d0024cd1881447fa7aed58db94df379e593c6630.zip
Avoid crashing when we have problems unlinking files post-commit.
smgrdounlink takes care to not throw an ERROR if it fails to unlink something, but that caution was rendered useless by commit 3396000684b41e7e9467d1abc67152b39e697035, which put an smgrexists call in front of it; smgrexists *does* throw error if anything looks funny, such as getting a permissions error from trying to open the file. If that happens post-commit, you get a PANIC, and what's worse the same logic appears in the WAL replay code, so the database even fails to restart. Restore the intended behavior by removing the smgrexists call --- it isn't accomplishing anything that we can't do better by adjusting mdunlink's ideas of whether it ought to warn about ENOENT or not. Per report from Joseph Shraibman of unrecoverable crash after trying to drop a table whose FSM fork had somehow gotten chmod'd to 000 permissions. Backpatch to 8.4, where the bogus coding was introduced.
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions