forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1b63075
committed
Fix some more bugs in GIN's WAL replay logic.
In commit4016bde I fixed a bunch ofginxlog.c bugs having to do with not handling XLogReadBuffer failurescorrectly. However, in ginRedoUpdateMetapage and ginRedoDeleteListPages,I unaccountably thought that failure to read the metapage would beimpossible and just put in an elog(PANIC) call. This is of course wrong:failure is exactly what will happen if the index got dropped (or rebuilt)between creation of the WAL record and the crash we're trying to recoverfrom. I believe this explains Nicholas Wilson's recent report of theseerrors getting reached.Also, fix memory leak in forgetIncompleteSplit. This wasn't of muchconcern when the code was written, but in a long-running standby serverpage split records could be expected to accumulate indefinitely.Back-patch to 8.4 --- before that, GIN didn't have a metapage.1 parentb5c077c commit1b63075
1 file changed
+6
-3
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 |
| |
63 | 65 |
| |
| 66 | + | |
64 | 67 |
| |
65 | 68 |
| |
66 | 69 |
| |
| |||
486 | 489 |
| |
487 | 490 |
| |
488 | 491 |
| |
489 |
| - | |
| 492 | + | |
490 | 493 |
| |
491 | 494 |
| |
492 | 495 |
| |
| |||
631 | 634 |
| |
632 | 635 |
| |
633 | 636 |
| |
634 |
| - | |
| 637 | + | |
635 | 638 |
| |
636 | 639 |
| |
637 | 640 |
| |
|
0 commit comments
Comments
(0)