From: | Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: warning in twophase.c |
Date: | 2017-04-25 07:16:45 |
Message-ID: | CAOgcT0NKmOtG_Qx+xmEiFQf7f8qdKpDrhKk++uqaR92JBV1Oag@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have also been seeing this warning lately, I had tried to check git log,
and
seems like following commit 546c13e11b29 by Simon has introduced it.
But per the commit log, this seems to be a temporary arrangement:
commit 546c13e11b29a5408b9d6a6e3cca301380b47f7f
Author: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Date: Sun Apr 23 22:12:01 2017 +0100
Workaround for RecoverPreparedTransactions()
Force overwriteOK = true while we investigate deeper fix
Proposed by Tom Lane as temporary measure, accepted by me
With latest update on following thread, it seems like Simon has proposed a
fix
that gets rid of flag overwriteOK:
Regards,
Jeevan Ladhe
On Tue, Apr 25, 2017 at 6:36 AM, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp
> wrote:
> Been seeing this warning recently:
>
> twophase.c: In function ‘RecoverPreparedTransactions’:
> twophase.c:1916:9: warning: variable ‘overwriteOK’ set but not used
> [-Wunused-but-set-variable]
> bool overwriteOK = false;
> ^~~~~~~~~~~
>
> As the message says, the value of overwriteOK is not used anywhere in
> RecoverPreparedTransactions:
>
> bool overwriteOK = false;
>
> /*
> * It's possible that SubTransSetParent has been set before, if
> * the prepared transaction generated xid assignment records. Test
> * here must match one used in AssignTransactionId().
> */
> if (InHotStandby && (hdr->nsubxacts >= PGPROC_MAX_CACHED_SUBXIDS ||
> XLogLogicalInfoActive()))
> overwriteOK = true;
>
> Couldn't we get rid of it?
>
> Thanks,
> Amit
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2017-04-25 07:21:53 | Re: warning in twophase.c |
Previous Message | David Rowley | 2017-04-25 07:11:55 | Re: Incorrect use of ERRCODE_UNDEFINED_COLUMN in extended stats |