Re: Incorrect initialization of sentPtr in walsender.c

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Incorrect initialization of sentPtr in walsender.c
Date: 2014-09-12 00:17:53
Message-ID: CAB7nPqR1tzEpzY3VBg3Nsk5w_q6+wtspiOkXAM2HSu36pHz_LQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 12, 2014 at 9:08 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> In walsender.c, sentPtr is initialized as follows:
> static XLogRecPtr sentPtr = 0;
> Isn't that incorrect and shouldn't we use InvalidXLogRecPtr instead?
Actually by looking more around I found a couple of extra places where
the same inconsistencies are present, mainly in xlog.c and
walreceiver.c. Updated patch attached for all those things.
Regards,
--
Michael

Attachment Content-Type Size
20140912_wal_incorrect_ptr.patch text/x-diff 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-09-12 00:34:45 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Michael Paquier 2014-09-12 00:08:39 Incorrect initialization of sentPtr in walsender.c