Re: Reorderbuffer crash during recovery
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-11-07T11:18:23Z
Lists: pgsql-bugs, pgsql-hackers
On Thu, Nov 07, 2019 at 11:01:17AM +0530, Dilip Kumar wrote: >On Thu, Nov 7, 2019 at 9:55 AM vignesh C <vignesh21@gmail.com> wrote: >> >> On Wed, Nov 6, 2019 at 5:41 PM Dilip Kumar <dilipbalaut@gmail.com> wrote: >> > >> > On Wed, Nov 6, 2019 at 5:20 PM vignesh C <vignesh21@gmail.com> wrote: >> > > >> > > Hi, >> > > >> > > ... >> > > >> > > Issue1 it seems like if all the reorderbuffer has been flushed and >> > > then the server restarts. This problem occurs. >> > > Issue 2 it seems like if there are many subtransactions present and >> > > then the server restarts. This problem occurs. The subtransaction's >> > > final_lsn is not being set and when ReorderBufferRestoreCleanup is >> > > called the assert fails. May be for this we might have to set the >> > > subtransaction's final_lsn before cleanup(not sure). >> > > >> > > I could not reproduce this issue consistently with a test case, But I >> > > felt this looks like a problem from review. >> > > >> > > For issue1, I could reproduce by the following steps: >> > > 1) Change ReorderBufferCheckSerializeTXN so that it gets flushed always. >> > > 2) Have many open transactions with subtransactions open. >> > > 3) Attach one of the transaction from gdb and call abort(). >> > >> > Do you need subtransactions for the issue1? It appears that after the >> > restart if the changes list is empty it will hit the assert. Am I >> > missing something? >> > >> >> When I had reported this issue I could reproduce this issue with >> sub-transactions. Now I have tried without using sub-transactions and >> could still reproduce this issue. You are right Issue 1 will appear in >> both the cases with and without subtransactions. > >Okay, thanks for the confirmation. > I'm a bit confused - does this happen only with the logical_work_mem patches, or with clean master too? If only with the patches, which version exactly? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Set ReorderBufferTXN->final_lsn more eagerly
- fe955ebee0f2 11.7 landed
- e3154aae3c26 10.12 landed
- cdb14154bb00 9.6.17 landed
- bc2140627ff1 12.2 landed
- 58997ace5b37 9.5.21 landed
- 20a1dc1e311d 9.4.26 landed
- 15cac3a523cc 13.0 landed
-
Fix failure to delete spill files of aborted transactions
- df9f682c7bf8 11.0 cited