forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd0024cd
committed
Avoid crashing when we have problems unlinking files post-commit.
smgrdounlink takes care to not throw an ERROR if it fails to unlinksomething, but that caution was rendered useless by commit3396000, which put an smgrexists call infront of it; smgrexists *does* throw error if anything looks funny, suchas getting a permissions error from trying to open the file. If thathappens post-commit, you get a PANIC, and what's worse the same logicappears in the WAL replay code, so the database even fails to restart.Restore the intended behavior by removing the smgrexists call --- it isn'taccomplishing anything that we can't do better by adjusting mdunlink'sideas of whether it ought to warn about ENOENT or not.Per report from Joseph Shraibman of unrecoverable crash after trying todrop a table whose FSM fork had somehow gotten chmod'd to 000 permissions.Backpatch to 8.4, where the bogus coding was introduced.1 parent7292055 commitd0024cd
File tree
4 files changed
+20
-26
lines changed- src/backend
- access/transam
- catalog
- storage/smgr
4 files changed
+20
-26
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1366 | 1366 |
| |
1367 | 1367 |
| |
1368 | 1368 |
| |
1369 |
| - | |
1370 |
| - | |
| 1369 | + | |
1371 | 1370 |
| |
1372 | 1371 |
| |
1373 | 1372 |
| |
|
Lines changed: 4 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4595 | 4595 |
| |
4596 | 4596 |
| |
4597 | 4597 |
| |
4598 |
| - | |
4599 |
| - | |
4600 |
| - | |
4601 |
| - | |
4602 |
| - | |
| 4598 | + | |
| 4599 | + | |
4603 | 4600 |
| |
4604 | 4601 |
| |
4605 | 4602 |
| |
| |||
4738 | 4735 |
| |
4739 | 4736 |
| |
4740 | 4737 |
| |
4741 |
| - | |
4742 |
| - | |
4743 |
| - | |
4744 |
| - | |
4745 |
| - | |
| 4738 | + | |
| 4739 | + | |
4746 | 4740 |
| |
4747 | 4741 |
| |
4748 | 4742 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
364 |
| - | |
365 |
| - | |
| 364 | + | |
366 | 365 |
| |
367 | 366 |
| |
368 | 367 |
| |
|
Lines changed: 14 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
323 | 323 |
| |
324 | 324 |
| |
325 | 325 |
| |
326 |
| - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
327 | 333 |
| |
328 | 334 |
| |
329 | 335 |
| |
| |||
351 | 357 |
| |
352 | 358 |
| |
353 | 359 |
| |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
361 | 364 |
| |
362 | 365 |
| |
363 | 366 |
| |
| |||
380 | 383 |
| |
381 | 384 |
| |
382 | 385 |
| |
| 386 | + | |
| 387 | + | |
| 388 | + | |
383 | 389 |
| |
384 | 390 |
| |
385 | 391 |
| |
| |||
411 | 417 |
| |
412 | 418 |
| |
413 | 419 |
| |
414 |
| - | |
415 |
| - | |
416 |
| - | |
417 |
| - | |
418 | 420 |
| |
419 | 421 |
| |
420 | 422 |
| |
|
0 commit comments
Comments
(0)