|From:||Antonin Houska <ah(at)cybertec(dot)at>|
|To:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|Subject:||Re: Unnecessary static variable?|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Antonin Houska <ah(at)cybertec(dot)at> writes:
> > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> At one time, I think, readLen told how much data in readBuf was
> >> actually valid. It seems not to be used for that anymore, but
> >> I don't much like the idea that readBuf is only partially filled
> >> but there is *no* persistent state indicating how much is valid.
> >> The existing coding guarantees that the answer is "XLOG_BLCKSZ",
> >> so that's fine, but this change would remove the guarantee.
> Oh, I withdraw that complaint --- readBuf isn't a persistent data
> structure anymore, so there's no need for readLen to be persistent
Well, there's yet a problem. Your concern about invalid data in readBuf
reminded me of a problem that I reported a few years ago . The problem is
hidden as long as all XLOG reader callbacks fetch the whole page.
However if readLen is used as an argument of read() in XLogPageRead() *and* if
some other conditions that also hide the issue are removed (see ), the
problem reported in  appears to be a live bug.
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26, A-2700 Wiener Neustadt
|Next Message||Simon Riggs||2018-01-18 16:07:20||Re: Faster inserts with mostly-monotonically increasing values|
|Previous Message||Alvaro Herrera||2018-01-18 15:56:25||Re: [HACKERS] Proposal: Local indexes for partitioned table|