From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Crash by targetted recovery |
Date: | 2020-02-27 03:48:30 |
Message-ID: | 20200227.124830.2197604521555566121.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello.
We found that targetted promotion can cause an assertion failure. The
attached TAP test causes that.
> TRAP: FailedAssertion("StandbyMode", File: "xlog.c", Line: 12078)
After recovery target is reached, StartupXLOG turns off standby mode
then refetches the last record. If the last record starts from the
previous WAL segment, the assertion failure is triggered.
The wrong point is that StartupXLOG does random access fetching while
WaitForWALToBecomeAvailable is thinking it is still in streaming. I
think if it is called with random access mode,
WaitForWALToBecomeAvailable should move to XLOG_FROM_ARCHIVE even
though it is thinking that it is still reading from stream.
regards.
-- Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
0001-TAP-test-for-a-crash-bug.patch | text/x-patch | 2.0 KB |
0002-Fix-a-crash-bug-of-targetted-promotion.patch | text/x-patch | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-02-27 04:03:15 | Re: allow frontend use of the backend's core hashing functions |
Previous Message | Jeff Davis | 2020-02-27 03:14:18 | Re: Memory-Bounded Hash Aggregation |