Re: Reorderbuffer crash during recovery

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reorderbuffer crash during recovery
Date: 2020-01-17 02:12:35
Message-ID: CALDaNm3XSXFed++sRSCu27XOQcEWsXcx1+2a3LGs1V+a3WXDpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Jan 16, 2020 at 9:17 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> One minor comment. Otherwise, the patch looks fine to me.
> + /*
> + * We set final_lsn on a transaction when we decode its commit or abort
> + * record, but we never see those records for crashed transactions. To
> + * ensure cleanup of these transactions, set final_lsn to that of their
> + * last change; this causes ReorderBufferRestoreCleanup to do the right
> + * thing. Final_lsn would have been set with commit_lsn earlier when we
> + * decode it commit, no need to update in that case
> + */
> + if (txn->final_lsn < change->lsn)
> + txn->final_lsn = change->lsn;
>
> /decode it commit,/decode its commit,
>

Thanks Dilip for reviewing.
I have fixed the comments you have suggested.

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
0001-Reorder-buffer-crash-while-aborting-old-transactions.patch text/x-patch 3.1 KB
0001-Reorder-buffer-crash-while-aborting-old-transactions-REL_10.patch text/x-patch 3.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dilip Kumar 2020-01-17 03:13:28 Re: Reorderbuffer crash during recovery
Previous Message David G. Johnston 2020-01-17 00:16:45 Re: BUG #16212: subquery block allows to overwrite table alias defined earlier

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-01-17 02:37:47 Re: pgindent && weirdness
Previous Message Andrew Dunstan 2020-01-17 01:54:57 Re: making the backend's json parser work in frontend code