Re: forgotten initalization of a variable - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: forgotten initalization of a variable
Date
Msg-id 20200421.180930.1857070578670533587.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: forgotten initalization of a variable  (Michael Paquier <michael@paquier.xyz>)
Responses Re: forgotten initalization of a variable  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
At Tue, 21 Apr 2020 17:34:26 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Tue, Apr 21, 2020 at 03:08:30PM +0900, Kyotaro Horiguchi wrote:
> > The commit a7e8ece41c adds a new member restoreCommand to
> > XLogPageReadPrivate. readOneRecord doesn't make use of it but forgets
> > to set NULL. That can lead to illegal pointer access.
> 
> That's an oversight of the original commit.  Now, instead of failing
> even if there is a restore command, wouldn't it be better to pass down
> the restore_command to readOneRecord() so as we can optionally
> improve the stability of a single record lookup?  This only applies to

Oops! You're right.

> a checkpoint record now, but this routine could be called elsewhere in
> the future.  Please see the attached.

It looks fine to me.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: WIP: Aggregation push-down
Next
From: Jeevan Ladhe
Date:
Subject: Re: WIP/PoC for parallel backup