Re: Is ParsePrepareRecord dead function

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is ParsePrepareRecord dead function
Date: 2019-07-30 03:12:06
Message-ID: CAA4eK1JWZieRzsXC_JquJGdXEQYkQd89KUOS-+Qc0f-Ftasr_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 30, 2019 at 2:34 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> On 2019-Jul-29, vignesh C wrote:
>
> > On Mon, Jul 29, 2019 at 8:24 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > >
> > > On Mon, Jul 29, 2019 at 4:10 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > > > I could not locate the caller of ParsePrepareRecord function in twophase.c.
> > > > Any idea how it gets called?
> > > > or
> > > > Is it a dead function?
> > >
> > > It looks like it's not only dead, but stillborn. Commit
> > > 1eb6d6527aae264b3e0b9c95aa70bb7a594ad1cf introduced it but without
> > > introducing any code that called it, and nothing has changed since
> > > then.
> >
> > I feel the code can be safely removed.
> > Patch for the same is attached.
>
> I think there's a patch from Fujii Masao that touches that? Might be
> premature to remove it.
>

Okay, can you point to that patch? Recently, Robert/Thomas has raised
a comment on undo machinery wherein we are considering to store
FullTransactionId in two-phase file. So, in that connection, we need
to modify this function as well. It is not impossible to test some
unused function (we can try it by superficially calling it at
someplace in code for the purpose of test), but it would have been
better if it is used in someplace.

[1] - https://www.postgresql.org/message-id/CA%2BTgmob1Oby7Wc5ryB_VBccU9N%2BuSKjXXocgT9dY_edfxqSA8Q%40mail.gmail.com
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brandur Leach 2019-07-30 03:17:19 Re: Patch for SortSupport implementation on inet/cdir
Previous Message Amit Kapila 2019-07-30 02:45:09 Re: POC: Cleaning up orphaned files using undo logs