Re: Do away with zero-padding assumption before WALRead() - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Do away with zero-padding assumption before WALRead()
Date
Msg-id 20240219.120241.1111838466302022974.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: Do away with zero-padding assumption before WALRead()  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
At Mon, 19 Feb 2024 11:56:22 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> Yeah, perhaps I was overly concerned. The removed comment made me
> think that someone could add code relying on the incorrect assumption
> that the remaining bytes beyond the returned count are cleared out. On
> the flip side, SimpleXLogPageRead always reads a whole page and
> returns XLOG_BLCKSZ. However, as you know, the returned buffer doesn't
> contain random garbage bytes. Therefore, it's safe as long as the

Forgot to mention that there is a case involving non-initialized
pages, but it doesn't affect the correctness of the description you
pointed out.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Do away with zero-padding assumption before WALRead()
Next
From: Michael Paquier
Date:
Subject: Re: Returning non-terminated string in ECPG Informix-compatible function